osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11724 )

Change subject: unix-time-to-fmt.py: fix crash without argument
......................................................................

unix-time-to-fmt.py: fix crash without argument

Print "unknown" to stdout when unix-time-to-fmt.py was called without
an argument, instead of printing a Python stack trace to stderr. It gets
called that way when building outside of a git folder.

Change-Id: I3ba27cc23543e47cc8a1e494c35cc33f1dc8f297
---
M build/unix-time-to-fmt.py
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/build/unix-time-to-fmt.py b/build/unix-time-to-fmt.py
index d081797..026e55c 100755
--- a/build/unix-time-to-fmt.py
+++ b/build/unix-time-to-fmt.py
@@ -11,6 +11,10 @@

 import sys, time

+if len(sys.argv) == 1:
+    print("unknown")
+    exit(0)
+
 fmt = '%Y-%b-%d'
 if len(sys.argv) > 2:
   fmt = sys.argv[2]

-- 
To view, visit https://gerrit.osmocom.org/11724
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3ba27cc23543e47cc8a1e494c35cc33f1dc8f297
Gerrit-Change-Number: 11724
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>

Reply via email to