Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 5f8124c

Browse files
author
PokestarFan
committed
Major code overhaul
1 parent a06c15c commit 5f8124c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

duplicate.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
logger = setup_logger('duplicates')
1010

11-
def action():
12-
for sub_id in reddit.subreddit('all').stream.submissions():
11+
def run_bot(sub_id):
12+
if True:
1313
try:
1414
logging.debug('Starting submission {}'.format(sub_id))
1515
blockeduser = 0
@@ -62,7 +62,11 @@ def action():
6262
raise KeyboardInterrupt
6363
except:
6464
logger.error('Error on submission {} occured.'.format(str(sub_id)), exc_info=True)
65-
65+
66+
67+
def action():
68+
for sub_id in reddit.subreddit('all').stream.submissions():
69+
run_bot(sub_id)
6670

6771

6872
if __name__ == '__main__':

0 commit comments

Comments
 (0)