[yocto] [auh][PATCH 19/20] upgradehelper.py: when recovering from upgrade error, do not refer to a dict entry that may not exist
Alexander Kanavin
alexander.kanavin at linux.intel.com
Thu Dec 14 08:35:59 PST 2017
From: Alexander Kanavin <alex.kanavin at gmail.com>
Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
---
upgradehelper.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/upgradehelper.py b/upgradehelper.py
index 3c41012..58fa0a6 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -510,7 +510,7 @@ class Updater(object):
E(" %s: %s" % (pkg_ctx['PN'], e.message))
- if os.listdir(pkg_ctx['workdir']):
+ if 'workdir' in pkg_ctx and os.listdir(pkg_ctx['workdir']):
E(" %s: Upgrade FAILED! Logs and/or file diffs are available in %s"
% (pkg_ctx['PN'], pkg_ctx['workdir']))
--
2.15.0
More information about the yocto
mailing list