aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-07-17 12:49:03 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-07-17 12:49:03 +0300
commitab90cef7a02809b7ac044322fd140a192b1bf182 (patch)
tree9ed36a339d8672d5d7ada39c50b4873c364d7feb
parent5e15940dca0fce52f5b609c616ce1b28ea80d61a (diff)
downloadtg2md-main.tar.gz
tg2md-main.zip
fix try except pass thingy.HEADmain
-rw-r--r--tg2md.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tg2md.py b/tg2md.py
index 5bb22e6..3ce60c5 100644
--- a/tg2md.py
+++ b/tg2md.py
@@ -11,6 +11,7 @@
# - multiple photos in one post
import os
+import logging
import argparse
import json
from datetime import datetime
@@ -278,8 +279,8 @@ def main():
try:
os.mkdir(args.out_dir)
- except FileExistsError:
- pass
+ except OSError as error:
+ logging.warning(error)
# load json file
try: