use pathlib properly

This commit is contained in:
Christopher Teutsch 2019-05-03 23:48:24 +02:00
parent 68a0e30b3f
commit 54c50d1f50
Signed by: iwonder
GPG Key ID: 0EE33D788D50130D

View File

@ -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():