'Used to retrieve the file size and not cause exceptions.'

def get_size(self):

    try:
        return self.file.size
    except OSError:
        return None
    except ValueError:
        return None
