Package: python-debian
Version: 0.1.6
Severity: normal
Tags: patch
When I try to use debian_bundle.debian_support.updateFile, I get the
following exception:
[EMAIL PROTECTED]:~$ /tmp/test_updateFile.py
Traceback (most recent call last):
File "/tmp/test_updateFile.py", line 9, in ?
updateFile( remote, local, True )
File "/var/lib/python-support/python2.4/debian_bundle/debian_support.py",
line 399, in updateFile
for (field, value) in fields:
ValueError: too many values to unpack
Attached are two files, test_updateFile.py is a small test case that
demonstrates the problem. fix_updateFile.diff is a patch which fixes
this problem.
thanks,
stew
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-debian depends on:
ii python 2.4.4-6 An interactive high-level object-o
ii python-support 0.7.5 automated rebuilding support for p
python-debian recommends no packages.
-- no debconf information
#!/usr/bin/python
from debian_bundle.debian_support import downloadFile,updateFile
remote = 'http://ftp.us.debian.org/debian/dists/sid/main/binary-amd64/Packages'
local = '/tmp/Packages'
downloadFile( remote, local )
updateFile( remote, local, True )
--- /tmp/debian_support.py.orig 2007-12-24 11:38:28.000000000 -0500
+++ /tmp/debian_support.py.mine 2007-12-24 11:40:09.000000000 -0500
@@ -396,7 +396,8 @@
return downloadFile(remote, local)
for fields in index_fields:
- for (field, value) in fields:
+ for field in fields.keys():
+ value=fields[ field ]
if field == 'SHA1-Current':
(remote_hash, remote_size) = re_whitespace.split(value)
if local_hash == remote_hash: