Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(self, filename):
try:
loader = ffImageLoader(filename)
except:
Logger.warning('Image: Unable to load image <%s>' % filename)
raise
# update internals
self.filename = filename
images = []
while True:
frame, t = loader.next_frame()
if frame is None:
break
images.append(frame)
if not len(images):
raise Exception('No image found in {}'.format(filename))
def load(self, filename):
try:
loader = ffImageLoader(filename)
except:
Logger.warning('Image: Unable to load image <%s>' % filename)
raise
# update internals
self.filename = filename
images = []
while True:
frame, t = loader.next_frame()
if frame is None:
break
images.append(frame)
if not len(images):
raise Exception('No image found in {}'.format(filename))