summaryrefslogtreecommitdiffstats
path: root/pykolab/xml/utils.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-02-20 22:01:11 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2014-02-20 22:01:11 -0500
commit6dd440aa974ad159d2d5666ff8370de6cafe5bdf (patch)
treea0c9b0501b2e589ee79142a38eee5b6886935976 /pykolab/xml/utils.py
parent26d6038d6a8226ad94580ee5cc58fd0800251cfa (diff)
downloadpykolab-6dd440aa974ad159d2d5666ff8370de6cafe5bdf.tar.gz
Fix type check of date/time objects
Diffstat (limited to 'pykolab/xml/utils.py')
-rw-r--r--pykolab/xml/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/xml/utils.py b/pykolab/xml/utils.py
index 0959c80..1771fa6 100644
--- a/pykolab/xml/utils.py
+++ b/pykolab/xml/utils.py
@@ -6,7 +6,7 @@ def to_dt(dt):
Convert a naive date or datetime to a tz-aware datetime.
"""
- if type(dt) == 'datetime.date' or not hasattr(dt, 'hour'):
+ if isinstance(dt, datetime.date) or not hasattr(dt, 'hour'):
dt = datetime.datetime(dt.year, dt.month, dt.day, 0, 0, 0, 0)
else: