do not try to open files if they dont exist

This commit is contained in:
Lionel Dricot 2023-08-31 20:45:52 +02:00
parent 446c940820
commit 28d22c4d11
1 changed files with 5 additions and 0 deletions

View File

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