diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-05-11 09:37:50 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-05-11 09:37:50 -0400 |
commit | f7c83f5614d577c6d65e651ad6fca26c1d7b4253 (patch) | |
tree | 8c1e3fa064d7864182fb197f9466487cbc943ae7 /src/lib | |
parent | 91634f9a3b888eee3cd5f9a777fcb075fc666c9a (diff) | |
download | bcfg2-f7c83f5614d577c6d65e651ad6fca26c1d7b4253.tar.gz bcfg2-f7c83f5614d577c6d65e651ad6fca26c1d7b4253.tar.bz2 bcfg2-f7c83f5614d577c6d65e651ad6fca26c1d7b4253.zip |
Improved Svn2 error handling -- ClientError may not have a message attribute.
Diffstat (limited to 'src/lib')
-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: |