Allow hooke.ui to load with missing hooke.license submodule.
[hooke.git] / hooke / ui / __init__.py
index d70bd41425334c4c0b75bac1ff9ccde3fe03f7f3..6a76b82e5356c8b3a764b8d4542d1833766f4d27 100644 (file)
 import ConfigParser as configparser
 
 from .. import version
-from ..license import short_license
 from ..config import Setting
 from ..util.pluggable import IsSubclass, construct_odict
 
+try:
+    from ..license import short_license
+except ImportError, e:
+    import logging
+    logging.warn('Could not load short_license from hooke.license')
+    from .. import __license__
+    def short_license(extra_info, **kwargs):
+        return __license__
+
 
 USER_INTERFACE_MODULES = [
     'commandline',