diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 63e9e09ba..8cefa941f 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -245,12 +245,11 @@ class Upgrade: for items in data: if items.find("wheel") > -1 and items.find("ALL=(ALL)"): continue + elif items.find("root") > -1 and items.find("ALL=(ALL)") > -1 and items[0] != '#': + writeToFile.writelines('root ALL=(ALL:ALL) ALL\n') else: writeToFile.writelines(items) - if items.find("root") > -1 and items.find("ALL=(ALL)") > -1 and items[0] != '#': - writeToFile.writelines('root ALL=(ALL:ALL) ALL\n') - writeToFile.close() except: pass