Skip to content

Commit

Permalink
Redact the bot's password from tracebacks
Browse files Browse the repository at this point in the history
  • Loading branch information
atdt committed May 3, 2015
1 parent cbc11fe commit 6df875a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dal.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@ def send_email(email_to, email_from, email_subject, email_body):
date = '%s %s, %s' % (month, day, year)
talk_page = wikitools.Page(metawiki, config.notification_page)
metawiki.login(config.wiki_username, config.wiki_password)
tb = traceback.format_exc().rstrip().replace(config.wiki_password, 'XXX')
text = '\n'.join(("Just thought you'd like to know:",
"<pre>",
traceback.format_exc().rstrip(),
tb,
"</pre>",
"Love, --~~~~"))
talk_page.edit(text=text,
Expand Down

0 comments on commit 6df875a

Please sign in to comment.