mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-03-27 07:56:48 +00:00
Keep logs for now
This commit is contained in:
parent
43d63b1e5a
commit
dc6c16ae16
11
twoot.py
11
twoot.py
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user