diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-05-11 09:37:50 -0400 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-06-14 12:36:45 -0500 |
commit | fa70c550a90c369ac48862d976e3d4294181be89 (patch) | |
tree | e62114237ff1c191fa29c1fbabc816f9b8487da5 /src/lib/Server | |
parent | 716168325c7221b33e3100b8a903bc5d075f6cf9 (diff) | |
download | bcfg2-fa70c550a90c369ac48862d976e3d4294181be89.tar.gz bcfg2-fa70c550a90c369ac48862d976e3d4294181be89.tar.bz2 bcfg2-fa70c550a90c369ac48862d976e3d4294181be89.zip |
Improved Svn2 error handling -- ClientError may not have a message attribute.
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Plugins/Svn2.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Svn2.py b/src/lib/Server/Plugins/Svn2.py index 35f555294..b8a8e6b7e 100644 --- a/src/lib/Server/Plugins/Svn2.py +++ b/src/lib/Server/Plugins/Svn2.py @@ -75,9 +75,9 @@ class Svn2(Bcfg2.Server.Plugin.Plugin, except Exception, err: # try to be smart about the error we got back details = None - if "callback_ssl_server_trust_prompt" in err.message: + if "callback_ssl_server_trust_prompt" in str(err): details = "SVN server certificate is not trusted" - elif "callback_get_login" in err.message: + elif "callback_get_login" in str(err): details = "SVN credentials not cached" if details is None: @@ -95,9 +95,9 @@ class Svn2(Bcfg2.Server.Plugin.Plugin, except Exception, err: # try to be smart about the error we got back details = None - if "callback_ssl_server_trust_prompt" in err.message: + if "callback_ssl_server_trust_prompt" in str(err): details = "SVN server certificate is not trusted" - elif "callback_get_login" in err.message: + elif "callback_get_login" in str(err): details = "SVN credentials not cached" if details is None: |