Commit 0b038131 authored by Raphael Beer's avatar Raphael Beer

Fix: use log() and debug() methods - no print()s

parent 3c3e8481
...@@ -70,9 +70,9 @@ class TwitterSession: ...@@ -70,9 +70,9 @@ class TwitterSession:
async with self._session.post('https://twitter.com/sessions', data=form_data, headers=self._headers) as r: async with self._session.post('https://twitter.com/sessions', data=form_data, headers=self._headers) as r:
await r.text() await r.text()
if str(r.url) == "https://twitter.com/": if str(r.url) == "https://twitter.com/":
print("Login of %s successful" % username) log("Login of %s successful" % username)
else: else:
print("Error logging in %s" % username) log("Error logging in %s" % username)
self.set_csrf_header() self.set_csrf_header()
self.username = username self.username = username
else: else:
...@@ -187,7 +187,8 @@ class TwitterSession: ...@@ -187,7 +187,8 @@ class TwitterSession:
obj["ban"] = True obj["ban"] = True
return obj return obj
except: except:
print(traceback.format_exc()) debug('Unexpected Exception:')
debug(traceback.format_exc())
async def test_barrier(self, user_id): async def test_barrier(self, user_id):
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment