[Erp5-report] r25314 - /erp5/trunk/products/ERP5Subversion/SubversionClient.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 27 12:55:31 CET 2009
Author: jerome
Date: Tue Jan 27 12:55:26 2009
New Revision: 25314
URL: http://svn.erp5.org?rev=25314&view=rev
Log:
define and allow SubversionLoginError and SubversionSSLTrustError before the
try / except ImportError to make those two classes available even if pysvn is
not installed (they are used by some python scripts)
Modified:
erp5/trunk/products/ERP5Subversion/SubversionClient.py
Modified: erp5/trunk/products/ERP5Subversion/SubversionClient.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Subversion/SubversionClient.py?rev=25314&r1=25313&r2=25314&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Subversion/SubversionClient.py [utf8] (original)
+++ erp5/trunk/products/ERP5Subversion/SubversionClient.py [utf8] Tue Jan 27 12:55:26 2009
@@ -54,34 +54,41 @@
"""Raised when a Subversion transaction is too long.
"""
pass
+
+class SubversionLoginError(SubversionError):
+ """Raised when an authentication is required.
+ """
+ # Declarative Security
+ security = ClassSecurityInfo()
+ def __init__(self, realm = None):
+ self._realm = realm
+
+ security.declarePublic('getRealm')
+ def getRealm(self):
+ return self._realm
+
+InitializeClass(SubversionLoginError)
+allow_class(SubversionLoginError)
+
+
+class SubversionSSLTrustError(SubversionError):
+ """Raised when a SSL certificate is not trusted.
+ """
+ # Declarative Security
+ security = ClassSecurityInfo()
+
+ def __init__(self, trust_dict = None):
+ self._trust_dict = trust_dict
+
+ security.declarePublic('getTrustDict')
+ def getTrustDict(self):
+ return self._trust_dict
+
+InitializeClass(SubversionSSLTrustError)
+allow_class(SubversionSSLTrustError)
try:
import pysvn
-
- class SubversionLoginError(SubversionError):
- """Raised when an authentication is required.
- """
- # Declarative Security
- security = ClassSecurityInfo()
- def __init__(self, realm = None):
- self._realm = realm
-
- security.declarePublic('getRealm')
- def getRealm(self):
- return self._realm
-
- class SubversionSSLTrustError(SubversionError):
- """Raised when a SSL certificate is not trusted.
- """
- # Declarative Security
- security = ClassSecurityInfo()
-
- def __init__(self, trust_dict = None):
- self._trust_dict = trust_dict
-
- security.declarePublic('getTrustDict')
- def getTrustDict(self):
- return self._trust_dict
class Callback:
"""The base class for callback functions.
@@ -370,11 +377,6 @@
def newSubversionClient(container, **kw):
return SubversionClient(container, **kw).__of__(container)
- InitializeClass(SubversionSSLTrustError)
- allow_class(SubversionSSLTrustError)
- InitializeClass(SubversionLoginError)
- allow_class(SubversionLoginError)
-
except ImportError:
from zLOG import LOG, WARNING
LOG('SubversionTool', WARNING,
More information about the Erp5-report
mailing list