[dput-ng-maint] Bug#849448: Exception on console when argument is not a changes file
Guido Günther
agx at sigxcpu.org
Tue Dec 27 09:22:22 UTC 2016
Package: dput-ng
Version: 1.11
Severity: minor
Hi,
by accident I passed a deb to dput and not a changes file:
$ dput firefoxdriver_2.53.2-3_amd64.deb
/usr/lib/python2.7/dist-packages/debian/deb822.py:214: UnicodeWarning: decoding from utf-8 failed; attempting to detect the true encoding
UnicodeWarning)
Traceback (most recent call last):
File "/usr/bin/dput", line 104, in <module>
os.path.dirname(changes)
File "/usr/lib/python2.7/dist-packages/dput/changes.py", line 346, in parse_changes_file
_c = Changes(filename=filename)
File "/usr/lib/python2.7/dist-packages/dput/changes.py", line 82, in __init__
self._data = deb822.Changes(open(filename))
File "/usr/lib/python2.7/dist-packages/debian/deb822.py", line 1267, in __init__
_multivalued.__init__(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/debian/deb822.py", line 1148, in __init__
Deb822.__init__(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/debian/deb822.py", line 336, in __init__
self._internal_parser(sequence, fields)
File "/usr/lib/python2.7/dist-packages/debian/deb822.py", line 441, in _internal_parser
line = self._detect_encoding(line)
File "/usr/lib/python2.7/dist-packages/debian/deb822.py", line 217, in _detect_encoding
return value.decode(result['encoding'])
TypeError: decode() argument 1 must be string, not None
It would be nicer if this looked like:
$ dput firefoxdriver_2.53.2-3_amd64.deb
firefoxdriver_2.53.2-3_amd64.deb is not a valid changes file.
I guess the underlying problem is in deb822 which fails when detecting the
encoding of the gziped file.
Cheers,
-- Guido
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-rc8-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages dput-ng depends on:
ii python-dput 1.11
pn python:any <none>
Versions of packages dput-ng recommends:
ii bash-completion 1:2.1-4.3
ii python-paramiko 2.0.0-1
dput-ng suggests no packages.
-- no debconf information
More information about the dput-ng-maint
mailing list