SeattleTestbed/softwareupdater

software updater logging error "need more than 1 value to unpack"

Closed this issue · 2 comments

After updating to 0.1j (at least, currently there's no indication that it happened before the update), some software updaters are logging the error "need more than 1 value to unpack" to the file softwareupdate.old (so, through the servicelogger).

This is likely coming from logging a str(e) for a "ValueError: need more than 1 value to unpack" exception (see #525). Such an exception can be caused in python through the following:

c = [0]
a, b = c

There may be other cases, but that is the only way I'm aware of and so is the likely culprit (that is, unpacking a list using that syntax when there is only one item in the list and multiple items on the right).

Author: jsamuel
Here's the full traceback:

Traceback (most recent call last):
  File "softwareupdater.py", line 698, in <module>
  File "softwareupdater.py", line 654, in main
  File "softwareupdater.py", line 164, in do_rsync
  File "/home/justin/downloads/seattle_repy/signeddata_repy.py", line 190, in signeddata_issignedcorrectly
ValueError: need more than 1 value to unpack

So this is the what results when the software updater downloads invalid data as the metainfo and tries to do a signature check on it. The fact that invalid data is downloaded currently is expected as the directory where updates are pulled from isn't currently available (intentionally).

When this error happens in init(), it is caught and ignored. When it happens in main(), it is caught and logged the loop that contains main() runs main() again.

I need to do further testing, but it appears that this will not stop the softwareupdater from working properly when updates become available again. It seems to be just an issue of vague log messages.

Author: justinc
Fixed in r2479.