diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2013-03-04 19:23:43 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2013-03-04 19:23:43 +0100 |
commit | d14824f21143766e7191c3c0b4c1c74be0c8d2c0 (patch) | |
tree | ffd3d188e956ac53f801c5b4d865e9431fa0ccb3 | |
parent | 915c643c86e862dd61479099d84d0a06b01cf3f9 (diff) |
catch errors in obfuscate password function
--HG--
extra : source : 867c4d7fd2d83f660c9084ffc414586179ab6ec2
-rw-r--r-- | rhodecode/lib/utils2.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rhodecode/lib/utils2.py b/rhodecode/lib/utils2.py index a0bc7d85..46c022fc 100644 --- a/rhodecode/lib/utils2.py +++ b/rhodecode/lib/utils2.py @@ -557,11 +557,15 @@ def fix_PATH(os_=None): def obfuscate_url_pw(engine): - from sqlalchemy.engine import url - url = url.make_url(engine) - if url.password: - url.password = 'XXXXX' - return str(url) + _url = engine or '' + from sqlalchemy.engine import url as sa_url + try: + _url = sa_url.make_url(engine) + if _url.password: + _url.password = 'XXXXX' + except: + pass + return str(_url) def get_server_url(environ): |