Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self,url,filesystem):
self.url = url
self.stripped_url=tts.strip_filename(url)
self.filesystem = filesystem
self._isImage=None
self._looked_for_location=False
self._location=None
def find_model(self,basename):
result=None
stripname = tts.strip_filename(basename)
for model_format in ['.obj']:
filename=os.path.join(self._models,stripname+model_format)
if os.path.isfile(filename):
result=filename
break
return result
def find_image(self,basename):
result=None
stripname = tts.strip_filename(basename)
for image_format in ['.png','.jpg','.bmp']:
filename=os.path.join(self._images,stripname+image_format)
if os.path.isfile(filename):
result=filename
break
return result