diff options
author | Lance Stout <lancestout@gmail.com> | 2011-08-04 00:07:30 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-08-04 00:07:30 -0700 |
commit | a0767f6af61bc9c54b2526cd51aef7af4e383e90 (patch) | |
tree | 9004b290fc7870ba062032d4fa2cafe425b49d7b /sleekxmpp/plugins/xep_0082.py | |
parent | 9ffdba8643ca8e52a30ce227331cd772a5fea6d1 (diff) | |
download | slixmpp-a0767f6af61bc9c54b2526cd51aef7af4e383e90.tar.gz slixmpp-a0767f6af61bc9c54b2526cd51aef7af4e383e90.tar.bz2 slixmpp-a0767f6af61bc9c54b2526cd51aef7af4e383e90.tar.xz slixmpp-a0767f6af61bc9c54b2526cd51aef7af4e383e90.zip |
Sadly, dateutil is not actually part of the standard lib.
Thus, using the XEP-0082 and XEP-0202 introduces a dependency
on the dateutil package (installable using pip install python-dateutil).
Maybe we'll be able to rework how these plugins work to avoid
needing dateutil, but for now this will have to do.
Diffstat (limited to 'sleekxmpp/plugins/xep_0082.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0082.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0082.py b/sleekxmpp/plugins/xep_0082.py index 785ba36b..e78a50ad 100644 --- a/sleekxmpp/plugins/xep_0082.py +++ b/sleekxmpp/plugins/xep_0082.py @@ -6,11 +6,18 @@ See the file LICENSE for copying permission. """ +import logging import datetime as dt -from dateutil import parser -from dateutil.tz import tzoffset, tzutc + from sleekxmpp.plugins.base import base_plugin +try: + from dateutil import parser + from dateutil.tz import tzoffset, tzutc +except e: + log = logging.getLogger(__name__) + log.warning("XEP-0082 plugin requires dateutil") + # ===================================================================== # To make it easier for stanzas without direct access to plugin objects |