Keep logs for now

This commit is contained in:
jeancf 2020-12-19 10:09:03 +01:00
parent 43d63b1e5a
commit dc6c16ae16

View File

@ -217,10 +217,10 @@ def main(argv):
min_delay = float(args['d']) min_delay = float(args['d'])
# Remove previous log file # Remove previous log file
try: #try:
os.remove(twit_account + '.log') # os.remove(twit_account + '.log')
except FileNotFoundError: #except FileNotFoundError:
pass # pass
# Setup logging to file # Setup logging to file
logging.basicConfig(filename=twit_account + '.log', level=logging.DEBUG) logging.basicConfig(filename=twit_account + '.log', level=logging.DEBUG)
@ -539,7 +539,6 @@ def main(argv):
sql.commit() sql.commit()
logging.info(str(posted_cnt) + ' Tweets posted to Mastodon') logging.info(str(posted_cnt) + ' Tweets posted to Mastodon')
logging.info('Run time : ' + str(time.time() - start_time) + ' seconds')
# Cleanup downloaded video files # Cleanup downloaded video files
try: try:
@ -547,6 +546,8 @@ def main(argv):
except FileNotFoundError: # The directory does not exist except FileNotFoundError: # The directory does not exist
pass pass
logging.info('Run time : ' + str(time.time() - start_time) + ' seconds')
logging.info('_____________________________________________________________')
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)