aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/lib/utils2.py
diff options
context:
space:
mode:
Diffstat (limited to 'rhodecode/lib/utils2.py')
-rw-r--r--rhodecode/lib/utils2.py14
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):