Commit 84468a3a authored by root's avatar root

insert missing global

parent 6e20b88e
...@@ -399,7 +399,7 @@ class TwitterSession: ...@@ -399,7 +399,7 @@ class TwitterSession:
if more_replies_test and not get_nested(result, ["tests", "ghost", "ban"], False): if more_replies_test and not get_nested(result, ["tests", "ghost", "ban"], False):
result["tests"]["more_replies"] = await self.test_barrier(user_id) result["tests"]["more_replies"] = await self.test_barrier(user_id)
debug('Writing result for ' + result['profile']['screen_name'] + ' to DB'); debug('Writing result for ' + result['profile']['screen_name'] + ' to DB')
db.write_result(result) db.write_result(result)
return result return result
...@@ -516,6 +516,7 @@ if args.debug is not None: ...@@ -516,6 +516,7 @@ if args.debug is not None:
debug_file = open(args.debug, "a") debug_file = open(args.debug, "a")
def run(): def run():
global db
db = connect(host=args.mongo_host, port=args.mongo_port) db = connect(host=args.mongo_host, port=args.mongo_port)
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
loop.run_until_complete(login_accounts(accounts, args.cookie_dir)) loop.run_until_complete(login_accounts(accounts, args.cookie_dir))
......
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