From d5b8090e4cae9f966189ecd7cc0815da0706f12b Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Mon, 16 Jun 2003 02:49:42 +0000 Subject: [PATCH] Made DateTime's constructor accept a time.struct_time class, besides plain tuples. --- Lib/xmlrpclib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index a3b9e70391..a873f770fa 100644 --- a/Lib/xmlrpclib.py +++ b/Lib/xmlrpclib.py @@ -343,7 +343,7 @@ class DateTime: def __init__(self, value=0): if not isinstance(value, StringType): - if not isinstance(value, TupleType): + if not isinstance(value, (TupleType, time.struct_time)): if value == 0: value = time.time() value = time.localtime(value) -- 2.50.1