use pathlib properly
This commit is contained in:
parent
68a0e30b3f
commit
54c50d1f50
2
crawl.py
2
crawl.py
@ -196,7 +196,7 @@ else:
|
|||||||
retrieve_date = _get_date()
|
retrieve_date = _get_date()
|
||||||
|
|
||||||
if args.cache_dir is not None:
|
if args.cache_dir is not None:
|
||||||
filepath = pathlib.Path(os.path.abspath(args.cache_dir))
|
filepath = pathlib.Path(args.cache_dir).resolve()
|
||||||
else:
|
else:
|
||||||
filepath = pathlib.Path(appdirs.user_cache_dir('FirstDataCrawler', 'iwonder'))
|
filepath = pathlib.Path(appdirs.user_cache_dir('FirstDataCrawler', 'iwonder'))
|
||||||
if not filepath.exists():
|
if not filepath.exists():
|
||||||
|
Loading…
Reference in New Issue
Block a user