use pathlib properly
This commit is contained in:
		
							
								
								
									
										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():
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user