def listLogs(self):
        """
        Return sorted list of integers - the old logs' identifiers.
        """
        result = []
        for name in glob.glob("%s.*" % self.path):
            try:
                counter = int(name.split('.')[-1])
                if counter:
                    result.append(counter)
            except ValueError:
                pass
        result.sort()
        return result

        Return sorted list of integers - the old logs' identifiers.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/logfile.py