Commit 0c439776 authored by Timothy Stack's avatar Timothy Stack
Browse files

Fix some more datetime marshalling problems.

parent ea73e3b0
......@@ -21,6 +21,7 @@ import exceptions
import xmlrpclib
import signal
import types
import datetime
sys.path.append("@prefix@/lib")
from libdb import *
from libtestbed import SENDMAIL, TBOPS
......@@ -1857,6 +1858,10 @@ class experiment:
if val == None:
res[0][key] = ""
pass
elif isinstance(val, datetime.datetime):
res[0][key] = xmlrpclib.DateTime(
time.strptime(str(val), "%Y-%m-%d %H:%M:%S"))
pass
pass
result = {}
......@@ -1886,6 +1891,10 @@ class experiment:
if val2 == None:
row[key2] = ""
pass
elif isinstance(val2, datetime.datetime):
row[key2] = xmlrpclib.DateTime(
time.strptime(str(val2), "%Y-%m-%d %H:%M:%S"))
pass
pass
rows.append(row)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment