summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <r00t@square-r00t.net>2020-07-24 22:50:13 -0400
committerbrent s <r00t@square-r00t.net>2020-07-24 22:50:13 -0400
commit3676acfc001de601e587ae4ca705d7d10529fe2a (patch)
tree07abd1b45d913f16fdfdc4937956226a90c57b9a
parenta2e9075671cb9dc6b1b8949346b041ae3d94c80f (diff)
downloadRepoMirror-3676acfc001de601e587ae4ca705d7d10529fe2a.tar.xz
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 <module> 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 <dictcomp> 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)
-rw-r--r--repomirror/sync.py2
1 files changed, 1 insertions, 1 deletions
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)