import-images fails under Python 3 when there are multiple images and at least one lacks a base

Bug #1379274 reported by Colin Watson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
New
Undecided
Unassigned

Bug Description

https://lists.launchpad.net/ubuntu-phone/msg10107.html reports an import-images failure following the conversion to Python 3 in lp:~ubuntu-system-image/ubuntu-system-image/server r246:

Traceback (most recent call last):
  File "/srv/system-image.ubuntu.com/bin/import-images", line 297, in <module>
    pub.sync_aliases(channel_name)
  File "/srv/system-image.ubuntu.com/bin/../lib/systemimage/tree.py", line 762, in sync_aliases
    self.sync_alias(alias_name)
  File "/srv/system-image.ubuntu.com/bin/../lib/systemimage/tree.py", line 668, in sync_alias
    for image in sorted(target_images - device_images):
TypeError: unorderable types: int() < NoneType()

This is due to this change in Python 3:

  https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons

I've temporarily cowboyed a server change to revert import-images to Python 2 since presumably the images containing non-ASCII files have been processed by now (I hope), but this should be fixed properly. I don't know whether the best answer is to temporarily map None onto some int value, or to create a new class with custom comparator methods, or something else.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.