msmith - in flumotion/trunk: . flumotion/twisted

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Thu May 24 18:05:29 CEST 2007


Author: msmith
Date: Thu May 24 18:05:27 2007
New Revision: 5030

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/twisted/portal.py
Log:
        * flumotion/twisted/portal.py:
          If we have no bouncer, don't use log.error (which raises
          SystemError, which isn't jellyable). Instead fail appropriately, so
          that the connecting client (admin, etc) gets a clear error message.
          Fixes #559.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Thu May 24 18:05:27 2007
@@ -1,5 +1,13 @@
 2007-05-24  Michael Smith <msmith at fluendo.com>
 
+	* flumotion/twisted/portal.py:
+	  If we have no bouncer, don't use log.error (which raises
+	  SystemError, which isn't jellyable). Instead fail appropriately, so
+	  that the connecting client (admin, etc) gets a clear error message.
+	  Fixes #559.
+
+2007-05-24  Michael Smith <msmith at fluendo.com>
+
 	* flumotion/manager/manager.py:
 	  When a component not known to the manager logs in, make sure we call
 	  all the appropriate functions to rebuild the entire depgraph

Modified: flumotion/trunk/flumotion/twisted/portal.py
==============================================================================
--- flumotion/trunk/flumotion/twisted/portal.py	(original)
+++ flumotion/trunk/flumotion/twisted/portal.py	Thu May 24 18:05:27 2007
@@ -30,7 +30,7 @@
 from twisted.python import failure, reflect
 from twisted.python.components import registerAdapter
 
-from flumotion.common import keycards, log, interfaces
+from flumotion.common import keycards, log, interfaces, errors
 from flumotion.twisted.pb import _FPortalRoot
 
 class BouncerPortal(log.Loggable):
@@ -60,7 +60,9 @@
         @rtype: L{defer.Deferred} firing list of str
         """
         if not self.bouncer:
-            self.error('No bouncer configured, no logins possible')
+            self.warning('No bouncer configured, no logins possible')
+            return defer.fail(errors.NotAuthenticatedError(
+                "No bouncer configured, no logins possible"))
         if hasattr(self.bouncer, 'getKeycardClasses'):
             # must return a deferred
             return self.bouncer.getKeycardClasses()


More information about the flumotion-commit mailing list