From 1e95b6321598aa3c180cc19f4402febab09d8c3f Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Fri, 12 Apr 2019 00:33:38 +0300 Subject: [PATCH] remove python2isms --- build-rpm.sh | 1 - check_newer_versions.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build-rpm.sh b/build-rpm.sh index eff1b2e..6f19451 100755 --- a/build-rpm.sh +++ b/build-rpm.sh @@ -186,7 +186,6 @@ probe_cpu } test_rpm() { - set -x # Rerun tests PACKAGES=${packages} \ chroot_path="$($MOCK_BIN --configdir=$config_dir --print-root-path)" \ diff --git a/check_newer_versions.py b/check_newer_versions.py index a31c1e8..59c79c7 100755 --- a/check_newer_versions.py +++ b/check_newer_versions.py @@ -53,7 +53,7 @@ for pkg in glob.glob(chroot_path + "/*.rpm"): p = os.popen("sudo chroot " + chroot_path + " urpmq --wget --wget-options --auth-no-challenge --evrd " + name + " 2>&1 | sed 's/|/\\n/g'") for existing_pkg in p.readlines(): if "Unknown option:" in existing_pkg: - print "This urpmq doesn't support --evrd option, the test will be skipped" + print("This urpmq doesn't support --evrd option, the test will be skipped") sys.exit(0) # existing_pkg should look like "name: epoch:version-release:distepoch" @@ -65,12 +65,12 @@ for pkg in glob.glob(chroot_path + "/*.rpm"): (ex_version, ex_release) = evrd_array[1].split("-") except: # urpmq output line is not recognized - just print it "as is" - print existing_pkg + print(existing_pkg) continue res = rpm5utils.miscutils.compareDEVR( (distepoch, epoch, version, release), (ex_distepoch, ex_epoch, ex_version, ex_release) ) if res < 1: - print "A package with the same name (" + name + ") and same or newer version (" + evrd + ") already exists in repositories!" + print(("A package with the same name (" + name + ") and same or newer version (" + evrd + ") already exists in repositories!")) exit_code = 1 # Matching package has been found - no need to parse other lines of "urpmq --evrd" break