Commit 65f4f3bb authored by Jérome Perrin's avatar Jérome Perrin

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)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25314 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d87375c1
......@@ -55,10 +55,7 @@ class SubversionTimeoutError(SubversionError):
"""
pass
try:
import pysvn
class SubversionLoginError(SubversionError):
class SubversionLoginError(SubversionError):
"""Raised when an authentication is required.
"""
# Declarative Security
......@@ -70,7 +67,11 @@ try:
def getRealm(self):
return self._realm
class SubversionSSLTrustError(SubversionError):
InitializeClass(SubversionLoginError)
allow_class(SubversionLoginError)
class SubversionSSLTrustError(SubversionError):
"""Raised when a SSL certificate is not trusted.
"""
# Declarative Security
......@@ -83,6 +84,12 @@ try:
def getTrustDict(self):
return self._trust_dict
InitializeClass(SubversionSSLTrustError)
allow_class(SubversionSSLTrustError)
try:
import pysvn
class Callback:
"""The base class for callback functions.
"""
......@@ -370,11 +377,6 @@ try:
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,
......
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