Browse code

Guard for worlddump in case LOGDIR is undefined

If LOGDIR is undefined, we'll end up calling worldump with the `-d` option but
pass in an empty string as the option value. This causes an argument parsing
error inside worlddump.

The proposed fix is to detect if LOGDIR is undefined, and if so, omit the `-d`
argument.

Change-Id: I77968849ebd3e3bebd2e5929b87b60fc1b6541bf
Closes-Bug: 1333321

Rick Harris authored on 2014/08/19 03:53:42
Showing 1 changed files
... ...
@@ -631,7 +631,11 @@ function exit_trap {
631 631
 
632 632
     if [[ $r -ne 0 ]]; then
633 633
         echo "Error on exit"
634
-        ./tools/worlddump.py -d $LOGDIR
634
+        if [[ -z $LOGDIR ]]; then
635
+            ./tools/worlddump.py
636
+        else
637
+            ./tools/worlddump.py -d $LOGDIR
638
+        fi
635 639
     fi
636 640
 
637 641
     exit $r