From 0b8991a0c12c58092465d6c7259dba25efafa3a1 Mon Sep 17 00:00:00 2001 From: Niveditha Rau Date: Thu, 29 Oct 2020 13:38:20 -0700 Subject: Fix for AttributeError: 'map' object has no attribute 'sort' --- gtkdoc-depscan.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in index a41d0a6..3d586db 100755 --- a/gtkdoc-depscan.in +++ b/gtkdoc-depscan.in @@ -36,7 +36,7 @@ class Book(object): lambda n: (os.path.getmtime(n), n), filter(os.path.isfile, catalogs)) - catalogs.sort() + catalogs = sorted(catalogs) if catalogs: self.__catalog = catalogs[-1][1] @@ -154,7 +154,7 @@ class Symbol(object): def __init__(self, text): match = re.match(r'^\w*\s*((?:\d+\.)*\d+)', text) - self.__numbers = map(int, match.group(1).split('.')) + self.__numbers = list(map(int, match.group(1).split('.'))) self.__hash = reduce(lambda x, y: x * 1000 + y, reversed(self.__numbers)) self.__text = text.strip() @@ -369,7 +369,7 @@ if '__main__' == __name__: for book in books.values(): requirements = book.find_requirements().items() - requirements.sort() + requirements = sorted(requirements) if requirements: for symbol in requirements[-1][1]: -- cgit v1.2.1