def METHOD_NAME(self, filename):
    if self.repo_dir:
        filename = os.path.join(self.repo_dir, filename)
        if os.path.isfile(filename):
            return os.path.getsize(filename)
    return 0