diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2019-02-15 14:21:02 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2019-02-15 14:21:27 +0100 |
commit | ee7d21fc755ab6a084312a656788441ea04dfb81 (patch) | |
tree | e74e6407d9c267b1147bbe53eedbccfe71c9db0f /dlpcvp.py | |
parent | 6c607bb6278312147ff353fcfe29a3be00d784c8 (diff) | |
download | dlp_check_version_PyPI-ee7d21fc755ab6a084312a656788441ea04dfb81.tar.gz |
Rename variables
Diffstat (limited to 'dlpcvp.py')
-rwxr-xr-x | dlpcvp.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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: |