unity8-lxc-setup local variable 'last_line' referenced before assignment

Bug #1568391 reported by mert özgür akdeniz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity8-lxc (Ubuntu)
New
Undecided
Unassigned

Bug Description

On Ubuntu 16.04 Beta 2, "sudo unity8-lxc-setup" returns the following error.

Determining latest LXC image release...
Traceback (most recent call last):
File "/usr/bin/unity8-lxc-setup", line 129, in <module>
current_release = get_latest_lxc_image(architecture)
File "/usr/bin/unity8-lxc-setup", line 87, in get_latest_lxc_image
release = last_line.decode().split('\t')
UnboundLocalError: local variable 'last_line' referenced before assignment.

To fix this, i edited script like that:

On line 76:
    cmd = ['/usr/share/lxc/templates/lxc-download', '-d', 'ubuntu', '-a', arch, '-l']

added "--no-validate" parameter, because it did not return with validation :

    cmd = ['/usr/share/lxc/templates/lxc-download', '-d', 'ubuntu', '-a', arch, '-l', '--no-validate']

On line 132:
container.create("download", 0,
                     {"dist": "ubuntu",
                      "release": current_release,
                      "arch": architecture})

added "--no-validate":

container.create("download", 0,
                     {"dist": "ubuntu",
                      "release": current_release,
                      "arch": architecture,
                      "no-validate": ""})

description: updated
description: updated
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.