projects.py: Fix python3 glitches

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-10 15:23:23 +00:00
commit 1e3d0f2c60

View file

@ -288,7 +288,7 @@ def get_os(args = ""):
if rr:
err("failed to run ", cmd)
continue
out = re.sub('\n', '', out)
out = re.sub('\n', '', out.decode('utf-8'))
return out
return "linux"
@ -512,7 +512,7 @@ def pkg_relations(rel_type, args_):
dep = re.split('([=><]+)', spec)
if args.no_version:
dep = dep[:1]
dep = map(str.strip, dep)
dep = list(map(str.strip, dep))
if args.no_subpackages:
dep[0] = re.sub('-dev$|-devel$|-run$', '', dep[0])
for i, item in enumerate(dep):