|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Fix TypeError with datetime() on old pyth
# HG changeset patch
# User Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1176476561 -3600
# Node ID 0ab8f81019a5df4250893f1aae2d64969b4d1c18
# Parent 22460cfaca71788d78a7f610706f78e28aea438c
Fix TypeError with datetime() on old python version
signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff -r 22460cfaca71 -r 0ab8f81019a5 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Fri Apr 13 15:24:42 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py Fri Apr 13 16:02:41 2007 +0100
@@ -96,7 +96,10 @@ def datetime(when = None):
@param when The time in question, given as seconds since the epoch, UTC.
May be None, in which case the current time is used.
"""
- return xmlrpclib.DateTime(time.gmtime(when))
+ if when is None:
+ return xmlrpclib.DateTime(time.gmtime())
+ else:
+ return xmlrpclib.DateTime(time.gmtime(when))
# ---------------------------------------------------
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Fix TypeError with datetime() on old python version,
Xen patchbot-unstable <=
|
|
|
|
|