mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-01-05 08:57:04 +00:00
Handled exception of video download directory absent when trying to delete it
This commit is contained in:
parent
dd1d54d2a4
commit
ba3da6ab7c
5
twoot.py
5
twoot.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user