local variable 'rtd' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Critical
|
Jason Hobbs |
Bug Description
Hit this bug trying to run a network_command via curtin:
root@cylindrica
Traceback (most recent call last):
File "/root/
sys.
File "/root/
with util.Chrootable
File "/root/
if rtd:
UnboundLocalError: local variable 'rtd' referenced before assignment
local variable 'rtd' referenced before assignment
Traceback (most recent call last):
File "/root/
sys.
File "/root/
stage.run()
File "/root/
util.subp(cmd, shell=shell, env=self.env)
File "/root/
cmd=args)
ProcessExecutio
Command: curtin in-target -- apt-get --assume-yes install bridge-utils
Exit code: 3
Turns out the tempfile.mkdtemp call that is suppose to set rtd is failing in this case, so rtd is never created, and when it's referenced in the except handler, we get the stacktrace above instead of something useful.
Related branches
- Blake Rouse (community): Approve
-
Diff: 14 lines (+1/-3)1 file modifiedcurtin/util.py (+1/-3)
Changed in curtin: | |
status: | New → In Progress |
assignee: | nobody → Jason Hobbs (jason-hobbs) |
Changed in curtin: | |
importance: | Undecided → Critical |
Changed in curtin: | |
status: | In Progress → Fix Committed |
This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New
Thank you.