summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-06-04 14:21:52 +0200
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-06-05 21:45:52 -0700
commit3d933ebf704c18ab3b7cdbd489021631fc1efe88 (patch)
tree7497980acc3a3e60b89548ec7c90f010591ccea3 /gentree.py
parentd58be321df286371d50ed54e835efeea087a9fac (diff)
gentree/git-tracker: make python 3 compatible
Make the python scripting compatible with python 3 (as tested with python 3.3). The patch library was a bit tricky. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-xgentree.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gentree.py b/gentree.py
index fef2faf6..356871d9 100755
--- a/gentree.py
+++ b/gentree.py
@@ -69,7 +69,7 @@ def check_output_dir(d, clean):
shutil.rmtree(d, ignore_errors=True)
try:
os.rmdir(d)
- except OSError, e:
+ except OSError as e:
if e.errno != errno.ENOENT:
raise
@@ -146,7 +146,7 @@ def copy_files(srcpath, copy_list, outdir):
else:
try:
os.makedirs(os.path.join(outdir, os.path.dirname(tgtitem)))
- except OSError, e:
+ except OSError as e:
# ignore dirs we might have created just now
if e.errno != errno.EEXIST:
raise
@@ -180,7 +180,7 @@ def add_automatic_backports(args):
bpi = kconfig.get_backport_info(os.path.join(args.outdir, 'compat', 'Kconfig'))
configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig'))
all_selects = configtree.all_selects()
- for sym, vals in bpi.iteritems():
+ for sym, vals in bpi.items():
if sym.startswith('BACKPORT_BUILD_'):
if not sym[15:] in all_selects:
continue
@@ -508,7 +508,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
new = []
for dep in deplist[sym]:
if dep == "DISABLE":
- new.append('BACKPORT_DISABLED_KCONFIG_OPTION')
+ new.append('BACKPORT_DISABLED_KCONFIG_OPTION')
else:
new.append('!BACKPORT_KERNEL_%s' % dep.replace('.', '_'))
deplist[sym] = new