From 3676acfc001de601e587ae4ca705d7d10529fe2a Mon Sep 17 00:00:00 2001 From: brent s Date: Fri, 24 Jul 2020 22:50:13 -0400 Subject: [PATCH] fixing dict comprehension /usr/local/lib/repomirror/repomirror/sync.py:361: UserWarning: The sync process for arch is locked with file /var/run/repomirror/arch.lck and PID 2981337. warnings.warn(warnmsg) Traceback (most recent call last): File "/usr/local/bin/reposync", line 56, in main() File "/usr/local/bin/reposync", line 51, in main r.sync() File "/usr/local/lib/repomirror/repomirror/sync.py", line 435, in sync distro.sync() File "/usr/local/lib/repomirror/repomirror/sync.py", line 363, in sync proc_info = {k.lstrip('_'):v for k, v in vars(proc) if k not in ('_lock', '_proc')} File "/usr/local/lib/repomirror/repomirror/sync.py", line 363, in proc_info = {k.lstrip('_'):v for k, v in vars(proc) if k not in ('_lock', '_proc')} ValueError: too many values to unpack (expected 2) --- repomirror/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repomirror/sync.py b/repomirror/sync.py index 96ddd49..f41f977 100644 --- a/repomirror/sync.py +++ b/repomirror/sync.py @@ -360,7 +360,7 @@ class Distro(object): if not _is_cron: warnings.warn(warnmsg) if proc: - proc_info = {k.lstrip('_'):v for k, v in vars(proc) if k not in ('_lock', '_proc')} + proc_info = {k.lstrip('_'): v for k, v in vars(proc).items() if k not in ('_lock', '_proc')} import pprint print('Process information:') pprint.pprint(proc_info)