[PATCH] lib/oe/package_manager: prevent testing an undefined variable

DORMANTno replies

From: Joshua Lock <hidden>
Date: 2016-01-22 09:44:12
Subsystem: the rest · Maintainer: Linus Torvalds

This prevents an error in do_populate_sdk when building
buildtools-tarball with ipk as the package manager:

Exception: UnboundLocalError: local variable 'pkg' referenced
before assignment

Signed-off-by: Joshua Lock <redacted>
---
 meta/lib/oe/package_manager.py | 1 +
 1 file changed, 1 insertion(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 6a6e3e9..5b87f45 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -308,6 +308,7 @@ class PkgsList(object):
         output = dict()
         filename = ""
         dep = []
+        pkg = ""
         for line in cmd_output.splitlines():
             line = line.rstrip()
             if ':' in line:
-- 
2.5.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help