Skip to content

Commit b45e955

Browse files
authored
Merge pull request chubin#251 from chubin/chubin.log-dir-creation
Create logdir for fetch
2 parents ee0f4c4 + d8a7732 commit b45e955

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/fetch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ def main(args):
200200
_show_usage()
201201
sys.exit(0)
202202

203+
logdir = os.path.dirname(CONFIG["path.log.fetch"])
204+
if not os.path.exists(logdir):
205+
os.makedirs(logdir)
206+
203207
logging.basicConfig(
204208
filename=CONFIG["path.log.fetch"],
205209
level=logging.DEBUG,

0 commit comments

Comments
 (0)