python: make logging import conditional in case time is not built

This commit is contained in:
Thomas Krijnen
2017-03-09 11:47:54 +01:00
parent 52d035d09a
commit 5705f24f3e
@@ -19,12 +19,16 @@
import functools
import numbers
import logging
import itertools
from . import ifcopenshell_wrapper
log = logging.getLogger(__name__)
try:
import logging
log = logging.getLogger(__name__)
except ImportError as e:
log = type('logger', (object,), {'exception': lambda s: print(s)})
class entity_instance(object):
def __init__(self, e):