def locate():
    'Locate the image file/index if decode fails.'
    if (self.seq is not None):
        idx = self.seq[((self.cur % self.num_image) - 1)]
    else:
        idx = ((self.cur % self.num_image) - 1)
    if (self.imglist is not None):
        (_, fname) = self.imglist[idx]
        msg = 'filename: {}'.format(fname)
    else:
        msg = 'index: {}'.format(idx)
    return ('Broken image ' + msg)
Locate the image file/index if decode fails.
def locate():
    
    if (self.seq is not None):
        idx = self.seq[((self.cur % self.num_image) - 1)]
    else:
        idx = ((self.cur % self.num_image) - 1)
    if (self.imglist is not None):
        (_, fname) = self.imglist[idx]
        msg = 'filename: {}'.format(fname)
    else:
        msg = 'index: {}'.format(idx)
    return ('Broken image ' + msg)