[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 05/12] show_abs_time: Represent undef $timet as <undef>


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Tue, 25 Aug 2020 12:40:34 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 25 Aug 2020 11:41:10 +0000
  • Ironport-sdr: 4t+ME1OGRVj6Rh9rektQjTmUrg6+tuuu0QA4AgD8135fN0HzyTSd7ALKiiyk1Acc3UPGvcAu2R tcWEMWPjdGkV+bm+uaFGZa+YO4+1yZHRBatcWUIqugBbaL1mIg6gekMuQZKo2p2NdNIZEFUWeI 0JK9sLGPRmCORlp59O8SkQqA3gbapgKZ8oro6FftusyXEw3lJMXmWjNQkWyoca1WJseHyM3eGg 4p4USDYf8KqsSH0a4Jltd/oFYloC4uypFy0xCOPdOD6VXScWX/ozHRCNvl4gIvPh+ZigxkUduA 2Cw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This can happen, for example, if a badly broken flight has steps which
are STARTING and have NULL in the start time column, and is then
reported using sg-report-flight.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest.pm b/Osstest.pm
index b2b6b741..734c0ef6 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -457,6 +457,7 @@ sub visible_undef ($) {
 
 sub show_abs_time ($) {
     my ($timet) = @_;
+    return '<undef>' unless defined $timet;
     return strftime "%Y-%m-%d %H:%M:%S Z", gmtime $timet;
 }
 
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.