Commit 956eb601 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Fixes for Python 2 compatibility

parent d35b5b81
Pipeline #67022 passed with stage
in 14 seconds
from __future__ import print_function
from __future__ import division
import sys
import osc
import osc.conf
import osc.core
import osc.oscerr
from osc.util.helper import decode_it
from functools import partial
from xml.etree import ElementTree
if sys.version_info[0] < 3:
def decode_it(arg):
return arg
else:
from osc.util.helper import decode_it
known_microarchs = {"sandybridge", "haswell", "skylake"}
package_attributes = ["MPCDF:enable_repositories"]
......
......@@ -9,7 +9,6 @@ import osc.cmdln
import mpcdf_common
from osc.util.helper import decode_it
from xml.etree import ElementTree
......@@ -100,7 +99,7 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
aggregatename = "zz_aggregate_" + project.replace(":", "-") + "_" + repo
refresh_aggregate(aggregatename, project, repo, target)
prjconf = list(map(decode_it, osc.core.show_project_conf(apiurl, "software:dist")))
prjconf = list(map(mpcdf_common.decode_it, osc.core.show_project_conf(apiurl, "software:dist")))
start_marker = "# Autogenerated by osc mpcdf_refresh_aggregates, do not edit till end of section\n"
end_marker = "# End of autogenerated section\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment