From 55bd8046e2605d9616338703c225a5ac2cecba0a Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Nov 06 2019 13:38:28 +0000 Subject: Drop useless double-quote in --queryformat --- diff --git a/prunerepo b/prunerepo index e9b6cfa..aa8f7fb 100755 --- a/prunerepo +++ b/prunerepo @@ -42,7 +42,7 @@ get_all_packages_cmd = [ '--repofrompath=prunerepo_query,'+os.path.abspath(args.path), '--repo=prunerepo_query', '--refresh', - '--queryformat="%{location}"', + '--queryformat=%{location}', '--quiet', ] @@ -83,7 +83,7 @@ def run_cmd(cmd, silent=False, dry_run=False): if process.returncode != 0: print(stderr.decode(encoding='utf-8'), file=sys.stderr) sys.exit(1) - return [line.strip('"') for line in stdout.decode(encoding='utf-8').split()] # NOTE: for some reason the get_all_packages_cmd gives output as b'"..."\n"..."\n', hence line.strip('"') + return stdout.decode(encoding='utf-8').split() def get_package_build_time(package_path): @@ -100,7 +100,7 @@ def get_rpms(repoquery_cmd): Get paths to rpm packages in the repository according to given repoquery_cmd """ stdout = run_cmd(repoquery_cmd) # returns srpms as well - rel_rpms_paths = [relpath.strip('"') for relpath in stdout if not is_srpm(relpath)] + rel_rpms_paths = [relpath for relpath in stdout if not is_srpm(relpath)] abs_rpms_paths = [os.path.abspath(os.path.join(args.path, relpath)) for relpath in rel_rpms_paths] return abs_rpms_paths