Skip to content

Commit 909a46a

Browse files
committed
Create directory if doesn't exist
1 parent 782c9dc commit 909a46a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from util import Chrome, get_text
99

1010
SOURCE_DIR = os.path.join('sources')
11+
if not os.path.isdir(SOURCE_DIR):
12+
os.mkdir(SOURCE_DIR)
1113
source_files = [f for f in os.listdir(SOURCE_DIR) if isfile(join(SOURCE_DIR, f))]
1214
saved_pids = set([os.path.splitext(f)[0] for f in source_files])
1315

0 commit comments

Comments
 (0)