[gtk-doc/ebassi/python3-fixes: 2/3] Fix for AttributeError: 'map' object has no attribute 'sort'
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc/ebassi/python3-fixes: 2/3] Fix for AttributeError: 'map' object has no attribute 'sort'
- Date: Mon, 30 Nov 2020 17:16:43 +0000 (UTC)
commit 0b8991a0c12c58092465d6c7259dba25efafa3a1
Author: Niveditha Rau <niveditha rau oracle com>
Date: Thu Oct 29 13:38:20 2020 -0700
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]:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]