I see that every apt-get command runs twice. I'm thinking, that there is a mistake in original code and that something like this should fix it:
def apt_get(cmd):
cmd = CMD_APT_GET + cmd
result = sudo(cmd)
# If the installation process was interrupted, we might get the following message
# E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
if "sudo dpkg --configure -a" in result:
sudo("DEBIAN_FRONTEND=noninteractive dpkg --configure -a")
return sudo(cmd)
else:
return result
But, may be, I just do not take into account all possible circumstances.
I see that every apt-get command runs twice. I'm thinking, that there is a mistake in original code and that something like this should fix it:
But, may be, I just do not take into account all possible circumstances.