Handled exception of video download directory absent when trying to delete it

This commit is contained in:
jeancf 2020-03-28 11:21:28 +01:00
parent dd1d54d2a4
commit ba3da6ab7c

View File

@ -529,7 +529,10 @@ def main(argv):
sql.commit() sql.commit()
# Cleanup downloaded video files # Cleanup downloaded video files
shutil.rmtree('./output/' + twit_account) try:
shutil.rmtree('./output/' + twit_account)
except FileNotFoundError: # The directory does not exist
pass
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)