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)
This commit is contained in:
parent
a2e9075671
commit
3676acfc00
@ -360,7 +360,7 @@ class Distro(object):
|
|||||||
if not _is_cron:
|
if not _is_cron:
|
||||||
warnings.warn(warnmsg)
|
warnings.warn(warnmsg)
|
||||||
if proc:
|
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
|
import pprint
|
||||||
print('Process information:')
|
print('Process information:')
|
||||||
pprint.pprint(proc_info)
|
pprint.pprint(proc_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user