Respect UTF-8 README in setup.py.
[hooke.git] / hooke / __init__.py
index 13bcc6867092e2093ca11bd24d76e3239f276166..9a04fec08a258758c4df9f485e650b1857552bf0 100644 (file)
@@ -25,14 +25,19 @@ The available submodules are:
 * :mod:`hooke.config`
 * :mod:`hooke.compat`
 """
+
+import sys as _sys
+
 try:
     from .license import LICENSE as __license__
-except ImportError, e:
+except ImportError as e:
     import logging
     logging.warn('could not load LICENSE from hooke.license')
     __license__ = 'All rights reserved.' 
 
-from .util import yaml  # extend YAML to parse Hooke-specific items.
+if _sys.version_info < (3,0):
+    # yaml library not yet compatible with Python 3
+    from .util import yaml  # extend YAML to parse Hooke-specific items.
 
 __version__ = (1, 0, 0, 'alpha', None, 'Ninken')
 """Version tuple::