[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "gen-make.py --debug" with Python 3 fails with TypeError

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 22 Apr 2020 20:09:17 +0000

Johan Corveleyn wrote on Wed, 22 Apr 2020 19:16 +00:00:
> Running "gen-make.py --debug" with Python 3 fails with:
>
> [[[
> Traceback (most recent call last):
> File "gen-make.py", line 326, in <module>
> main(conf, gentype, skip_depends=skip, other_options=rest.list)
> File "gen-make.py", line 73, in main
> sorted_targets = list(target_dict.keys()); sorted_targets.sort()
> TypeError: '<' not supported between instances of 'ObjectFile' and 'ObjectFile'
> ]]]

Does this help? It seems it just prints that stuff to stdout?

[[[
Index: gen-make.py
===================================================================
--- gen-make.py (revision 1876852)
+++ gen-make.py (working copy)
@@ -70,7 +70,8 @@ def main(fname, gentype, verfname=None,
 
   if ('--debug', '') in other_options:
     for dep_type, target_dict in generator.graph.deps.items():
- sorted_targets = list(target_dict.keys()); sorted_targets.sort()
+ sorted_targets = list(target_dict.keys())
+ sorted_targets.sort(key = lambda dep: dep.filename)
       for target in sorted_targets:
         print(dep_type + ": " + _objinfo(target))
         for source in target_dict[target]:
]]]
Received on 2020-04-22 22:09:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.