git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b564bed
)
Added unknown option in case none given
author
Maran
<maran.hidskes@gmail.com>
Sun, 9 Dec 2012 12:50:13 +0000 (13:50 +0100)
committer
Maran
<maran.hidskes@gmail.com>
Sun, 9 Dec 2012 12:50:13 +0000 (13:50 +0100)
lib/util.py
patch
|
blob
|
history
diff --git
a/lib/util.py
b/lib/util.py
index
393d2c9
..
6ae8aaa
100644
(file)
--- a/
lib/util.py
+++ b/
lib/util.py
@@
-5,6
+5,9
@@
is_verbose = True
# Takes a timestamp and puts out a string with the approxomation of the age
def age(from_date, since_date = None, target_tz=None, include_seconds=False):
+ if from_date is None:
+ return "Unknown"
+
from_date = datetime.fromtimestamp(from_date)
if since_date is None:
since_date = datetime.now(target_tz)