Skip to content

Commit

Permalink
Merge branch 'jb45864-python3' into 'master'
Browse files Browse the repository at this point in the history
[ssu-sysinfo] Port to Python 3. JB#45864

See merge request mer-core/ssu-sysinfo!11
  • Loading branch information
pvuorela committed Jul 8, 2020
2 parents 142985d + b3ace2e commit 2a3002c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions rpm/ssu-sysinfo.spec
Expand Up @@ -3,8 +3,7 @@ Name: ssu-sysinfo
Summary: Tools and libraries for getting ssu information without D-Bus IPC
Version: 1.2.2
Release: 0
Group: System/System Control
License: LGPLv2.1+ and BSD
License: LGPLv2+ and BSD
URL: https://git.merproject.org/mer-core/ssu-sysinfo
Source0: %{name}-%{version}.tar.bz2
Requires(post): /sbin/ldconfig
Expand Down
10 changes: 5 additions & 5 deletions util/depend_filter.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- encoding: utf8 -*-

# ----------------------------------------------------------------------------
Expand All @@ -13,7 +13,7 @@ def is_local(path):
return not path.startswith("/")

def print_rule(dest, srce):
print "%s\\\n" % "\\\n\t".join(["%s:" % dest] + srce)
print("%s\\\n" % "\\\n\t".join(["%s:" % dest] + srce))

def set_extension(path, ext):
return os.path.splitext(path)[0] + ext
Expand All @@ -29,7 +29,7 @@ def fix_directory(dest, srce):
if __name__ == "__main__":

data = sys.stdin.readlines()
data = map(lambda x:x.rstrip(), data)
data = [x.rstrip() for x in data]
data.reverse()

deps = []
Expand All @@ -52,13 +52,13 @@ def fix_directory(dest, srce):
dest = fix_directory(dest, srce)

# remove secondary deps with absolute path
temp = filter(is_local, temp)
temp = list(filter(is_local, temp))

# sort secondary sources
temp.sort()

srce = [srce] + temp
srce = map(normalize_path, srce)
srce = list(map(normalize_path, srce))

deps.append((dest,srce))

Expand Down

0 comments on commit 2a3002c

Please sign in to comment.