Commit ae3cd39f authored by Gaute Hope's avatar Gaute Hope

lp:bug:1618106: execute referenced before assignment

parent abb45c2d
......@@ -704,10 +704,9 @@ class main:
tmp.flush ()
self.temp_files.append ((tmp, path))
if self.root == 1:
if self.user != "root":
execute = "su " + self.user + " -c \"" + self.user_shell + " " + path
os.chown (path, self.uid, self.gid)
if self.root == 1 and self.user != "root":
execute = "su " + self.user + " -c \"" + self.user_shell + " " + path
os.chown (path, self.uid, self.gid)
else:
execute = self.user_shell + " " + path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment