]> xenbits.xensource.com Git - osstest.git/commitdiff
sg-report-flight: avoid an undefined ref
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 14 Feb 2013 14:48:18 +0000 (14:48 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Feb 2013 14:48:18 +0000 (14:48 +0000)
sg-report-flight

index 92f7551825a426940b2014e388c7c5a9ee52983b..69ef252014fbab773fabf76ed97de849f6ee77e8 100755 (executable)
@@ -812,8 +812,12 @@ END
             encode_entities(strftime "%Y-%m-%d %H:%M:%S Z",
                             gmtime $step->{started});
 
-        printf H "<td align=right>%d</td>\n",
-            $step->{finished} - $step->{started};
+       if (defined $step->{finished} && defined $step->{started}) {
+           printf H "<td align=right>%d</td>\n",
+                $step->{finished} - $step->{started};
+       } else {
+           printf H "<td></td>\n";
+       }
     }
 
     print H <<END;