Mercurial > kallithea
comparison rhodecode/lib/utils2.py @ 2882:12fce5e499d5 beta
obfuscate password in logs for engine connection string
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 29 Sep 2012 19:16:00 +0200 |
parents | ccbdff90e5a0 |
children | e2b2791d1e7c |
comparison
equal
deleted
inserted
replaced
2881:6b79e96f6ecd | 2882:12fce5e499d5 |
---|---|
495 os = os_ | 495 os = os_ |
496 | 496 |
497 cur_path = os.path.split(sys.executable)[0] | 497 cur_path = os.path.split(sys.executable)[0] |
498 if not os.environ['PATH'].startswith(cur_path): | 498 if not os.environ['PATH'].startswith(cur_path): |
499 os.environ['PATH'] = '%s:%s' % (cur_path, os.environ['PATH']) | 499 os.environ['PATH'] = '%s:%s' % (cur_path, os.environ['PATH']) |
500 | |
501 | |
502 def obfuscate_url_pw(engine): | |
503 from sqlalchemy.engine import url | |
504 url = url.make_url(engine) | |
505 if url.password: | |
506 url.password = 'XXXXX' | |
507 return str(url) |