From: Gustavo Niemeyer Date: Mon, 16 Jun 2003 02:49:42 +0000 (+0000) Subject: Made DateTime's constructor accept a time.struct_time class, X-Git-Tag: v2.3c1~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5b8090e4cae9f966189ecd7cc0815da0706f12b;p=python Made DateTime's constructor accept a time.struct_time class, besides plain tuples. --- 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)