[Reportbug-maint] Bug#578296: git-core: "ValueError: too many values to unpack"
Sandro Tosi
morph at debian.org
Thu Apr 22 17:27:02 UTC 2010
Hello Ilguiz,
On Wed, Apr 21, 2010 at 12:10, Ilguiz Latypov <ilatypov at infradead.org> wrote:
> I wonder if ignoring any extra information in conffiles records addresses the
> root cause properly. Here is the change I am suggesting.
>
> =====================================================================
> --- /usr/share/pyshared/reportbug/utils.py.orig 2010-04-21 05:58:15.000000000 -0400
> +++ /usr/share/pyshared/reportbug/utils.py 2010-04-21 05:56:05.000000000 -0400
> @@ -641,7 +641,9 @@
> def get_changed_config_files(conffiles, nocompress=False):
> confinfo = {}
> changed = []
> - for (filename, md5sum) in conffiles:
> + for cf in conffiles:
> + filename = cf[ 0 ]
> + md5sum = cf[ 1 ]
> try:
> fp = file(filename)
> except IOError, msg:
> =====================================================================
Thanks for the proposed patch. Anyhow, the right solution is to simply
ignore that extra value in the module that parses them,
utils.get_package_status and so the patch is:
diff --git a/reportbug/utils.py b/reportbug/utils.py
index ce7d82d..74fa42b 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -342,7 +342,7 @@ def get_package_status(package, avail=False):
if line[:2] != ' /':
confmode = False
else:
- conffiles = conffiles + [tuple(line.split())]
+ conffiles = conffiles + [tuple(line.split()[:2])]
if versionre.match(line):
(crud, pkgversion) = line.split(": ", 1)
Regards,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
More information about the Reportbug-maint
mailing list