apt: fix KeyError for deb=file (#3816)

Fix KeyError: 'prepared' while installing dependencies using deb=<file>.deb
This error shows up when --diff was not passed by and the deb files has dependencies not yet installed.
Closes #3752.
This commit is contained in:
René Moser 2016-06-01 22:43:34 +02:00 committed by Matt Clay
parent 73bc9fd0e0
commit a85d9930c5

View file

@ -535,7 +535,8 @@ def install_deb(m, debs, cache, force, install_recommends, allow_unauthenticated
stdout = out
if "diff" in retvals:
diff = retvals["diff"]
diff["prepared"] += '\n\n' + out
if 'prepared' in diff:
diff['prepared'] += '\n\n' + out
else:
diff = out
if "stderr" in retvals: