Skip to content

Commit

Permalink
Merge pull request #455 from Charcoal-SE/code_simplifications
Browse files Browse the repository at this point in the history
Code simplifications and fixes
  • Loading branch information
ArtOfCode- committed Jan 16, 2017
2 parents b2c35d1 + 07f6fd2 commit 8015b83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bodyfetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def make_api_call_for_site(self, site):
if GlobalVars.api_backoff_time > time.time():
time.sleep(GlobalVars.api_backoff_time - time.time() + 2)
try:
time_request_made = datetime.strftime(datetime.now(), '%H:%M:%S')
time_request_made = datetime.now().strftime('%H:%M:%S')
response = requests.get(url, timeout=20).json()
except (requests.exceptions.Timeout, requests.ConnectionError, Exception):
# Any failure in the request being made (timeout or otherwise) should be added back to
Expand Down
2 changes: 1 addition & 1 deletion chatcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def subcommand_falsepositive(ev_room, ev_user_id, wrap2, post_site_id, post_url,
elif not quiet_action:
return Response(command_status=True, message="Registered answer as false positive.")
try:
if not msg.room == charcoal_hq:
if not msg.room == GlobalVars.charcoal_hq:
msg.delete()
except:
pass
Expand Down

0 comments on commit 8015b83

Please sign in to comment.