Modernize Python 2 code to get ready for Python 3

This commit is contained in:
cclauss
2018-12-01 23:58:26 +01:00
parent 701bb1b44e
commit d7bacfa611
83 changed files with 398 additions and 323 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
from __future__ import print_function
import os
import re
@@ -7,7 +8,7 @@ import xml.etree.ElementTree as ET
try:
from argparse import ArgumentParser
except:
print "Failed to import module 'argparse'. Upgrade to Python 2.7, copy argparse.py to this directory or try 'apt-get install python-argparse'"
print("Failed to import module 'argparse'. Upgrade to Python 2.7, copy argparse.py to this directory or try 'apt-get install python-argparse'")
raise
parser = ArgumentParser(description='Patch some code generation, so it builds')