aboutsummaryrefslogtreecommitdiffstats
path: root/dlpcvp.py
diff options
context:
space:
mode:
Diffstat (limited to 'dlpcvp.py')
-rwxr-xr-xdlpcvp.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/dlpcvp.py b/dlpcvp.py
index e46ce05..bab5ee9 100755
--- a/dlpcvp.py
+++ b/dlpcvp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3.6
+#!/usr/bin/python3
# Requires: python3-rpm
import argparse
@@ -87,8 +87,8 @@ def suse_packages(proj: str) -> Iterable[str]:
raise
-def parse_spec_in_dev_null(spec_file_name, pkg_name, etag_fn, etag_spcf):
- # rpm library generates awfull lot of nonsensical goo on
+def parse_spec_in_dev_null(spec, pkg, e_fn, e_spcf):
+ # rpm library generates awful lot of nonsensical goo on
# stderr
with open(os.devnull, 'wb') as nullf:
old_stderr = sys.stderr
@@ -96,13 +96,13 @@ def parse_spec_in_dev_null(spec_file_name, pkg_name, etag_fn, etag_spcf):
sys.stderr = nullf
sys.stdout = nullf
try:
- spc = rpm.spec(spec_file_name)
+ spc = rpm.spec(spec)
except Exception:
- log.error("Cannot parse {}".format(pkg_name))
+ log.error("Cannot parse {}".format(pkg))
else:
try:
return spc.packages[0].header['Version'].decode(), \
- etag_fn, etag_spcf
+ e_fn, e_spcf
except IndexError:
pass
finally: