"grep-merges" fails with "TypeError: sequence item 0: expected string, NoneType found"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-dev-tools (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
$ grep-merges Basak
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
pretty_uploader = ' '.join((author, uploader)).strip()
TypeError: sequence item 0: expected string, NoneType found
I've been told other people are hitting this, too. At least Xenial (0.155ubuntu2) and Zesty (0.157) are affected. Patch:
--- /usr/bin/
+++ /tmp/grep-merges 2017-02-07 00:23:22.802977775 +0000
@@ -61,9 +61,9 @@
for merge in json.loads(page):
- if 'user' in merge:
+ if merge.get('user'):
- if 'uploader' in merge:
+ if merge.get(
if (match is None or
Related branches
- Martin Pitt: Approve
- Stefano Rivera: Pending requested
- Benjamin Drung: Pending requested
-
Diff: 15 lines (+2/-2)1 file modifiedgrep-merges (+2/-2)
This bug was fixed in the package ubuntu-dev-tools - 0.158
---------------
ubuntu-dev-tools (0.158) experimental; urgency=medium
* Team upload.
[ Dmitry Shachnev ]
* grep-merges: Do not override author or uploader with None.
There can be JSON entries which have uploader=None. (LP: #1663601)
[ Colin Watson ]
* pbuilder-dist, ubuntu-build: Add s390x.
[ James Page ]
* grep-merges: Use unicode string format for pretty output to deal with
non ascii encoding.
[ Corey Bryant ]
* pull-uca-source: Added to pull source from Ubuntu Cloud Archive.
-- Mattia Rizzolo <email address hidden> Wed, 29 Mar 2017 20:07:38 +0200