Skip to content

Commit

Permalink
refactor extraneous conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Sep 20, 2016
1 parent 8fe6627 commit 947a4f1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ws.py
Expand Up @@ -176,12 +176,8 @@ def restart_automatically(time_in_seconds):
a = ws.recv()
if a is not None and a != "":
is_spam, reason, why = check_if_spam_json(a)
if is_spam:
t = Thread(target=GlobalVars.bodyfetcher.add_to_queue, args=(a, True))
t.start()
else:
t = Thread(target=GlobalVars.bodyfetcher.add_to_queue, args=(a,))
t.start()
t = Thread(target=GlobalVars.bodyfetcher.add_to_queue, args=(a, True if is_spam else None))
t.start()
except Exception, e:
exc_type, exc_obj, exc_tb = sys.exc_info()
now = datetime.utcnow()
Expand Down

0 comments on commit 947a4f1

Please sign in to comment.