forked from solderpunk/AV-98
Compare commits
2 Commits
4c328e32aa
...
28d22c4d11
Author | SHA1 | Date |
---|---|---|
Lionel Dricot | 28d22c4d11 | |
Lionel Dricot | 446c940820 |
|
@ -1836,10 +1836,13 @@ def main():
|
|||
if args.url:
|
||||
gc.sync_only = True
|
||||
for u in args.url:
|
||||
if netcache.is_cache_valid(u):
|
||||
gc.list_add_line("tour",u)
|
||||
if looks_like_url(u):
|
||||
if netcache.is_cache_valid(u):
|
||||
gc.list_add_line("tour",u)
|
||||
else:
|
||||
gc.list_add_line("to_fetch",u)
|
||||
else:
|
||||
gc.list_add_line("to_fetch",u)
|
||||
print("%s is not a valid URL to fetch"%u)
|
||||
else:
|
||||
print("--fetch-later requires an URL (or a list of URLS) as argument")
|
||||
elif args.sync:
|
||||
|
|
5
opnk.py
5
opnk.py
|
@ -189,6 +189,11 @@ class opencache():
|
|||
cachepath = netcache.fetch(inpath,**kwargs)
|
||||
if not cachepath:
|
||||
return False
|
||||
elif os.path.exists(inpath):
|
||||
cachepath = inpath
|
||||
else:
|
||||
print("%s does not exist"%inpath)
|
||||
return
|
||||
renderer = self.get_renderer(inpath,mode=mode)
|
||||
if renderer and mode:
|
||||
renderer.set_mode(mode)
|
||||
|
|
Loading…
Reference in New Issue