Commit a110730b authored by Christophe Dumez's avatar Christophe Dumez

- fixed a bug when pysvn is not installed that prevented to display "Pysvn is...

- fixed a bug when pysvn is not installed that prevented to display "Pysvn is not installed" warning.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7250 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a40a6abb
...@@ -39,31 +39,29 @@ from Products.PythonScripts.Utility import allow_class ...@@ -39,31 +39,29 @@ from Products.PythonScripts.Utility import allow_class
from tempfile import mktemp from tempfile import mktemp
from Products.ERP5.Document.BusinessTemplate import removeAll from Products.ERP5.Document.BusinessTemplate import removeAll
try: class SubversionError(Exception):
import pysvn
class SubversionError(Exception):
"""The base exception class for the Subversion interface. """The base exception class for the Subversion interface.
""" """
pass pass
class SubversionInstallationError(SubversionError): class SubversionInstallationError(SubversionError):
"""Raised when an installation is broken. """Raised when an installation is broken.
""" """
pass pass
class SubversionTimeoutError(SubversionError): class SubversionTimeoutError(SubversionError):
"""Raised when a Subversion transaction is too long. """Raised when a Subversion transaction is too long.
""" """
pass pass
try:
import pysvn
class SubversionLoginError(SubversionError): class SubversionLoginError(SubversionError):
"""Raised when an authentication is required. """Raised when an authentication is required.
""" """
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
def __init__(self, realm = None): def __init__(self, realm = None):
self._realm = realm self._realm = realm
...@@ -341,4 +339,4 @@ except ImportError: ...@@ -341,4 +339,4 @@ except ImportError:
LOG('SubversionTool', WARNING, LOG('SubversionTool', WARNING,
'could not import pysvn; until pysvn is installed properly, this tool will not work.') 'could not import pysvn; until pysvn is installed properly, this tool will not work.')
def newSubversionClient(container, **kw): def newSubversionClient(container, **kw):
raise SubversionInstallationError, 'pysvn is not installed' raise SubversionInstallationError, 'pysvn library is not installed'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment