[bitbake-devel] bitbake-diffsigs: Fix runtime error when no arguments are given

Submitted by Jacob Kroon on April 26, 2014, 3:05 p.m.


Message ID 1398524730-16722-1-git-send-email-jacob.kroon@mikrodidakt.se
State New
Headers show

Commit Message

Jacob Kroon April 26, 2014, 3:05 p.m.
If bitbake-diffsigs is run without arguments it will error:

    Traceback (most recent call last):
      File "./bin/bitbake-diffsigs", line 121, in <module>
        if output:
    NameError: name 'output' is not defined

Fix this by moving the check for output into the inner else-clause.

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
 bin/bitbake-diffsigs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/bin/bitbake-diffsigs b/bin/bitbake-diffsigs
index 78757b0..08ae00d 100755
--- a/bin/bitbake-diffsigs
+++ b/bin/bitbake-diffsigs
@@ -118,5 +118,5 @@  else:
             logger.error('Invalid signature data - ensure you are specifying sigdata/siginfo files')
-    if output:
-        print '\n'.join(output)
+        if output:
+            print '\n'.join(output)