Skip to content

Commit 7f232c1

Browse files
committed
style(init): Only log exceptions when python version is 3 or higher
1 parent 9e18307 commit 7f232c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

honeybee/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Honeybee core library."""
22
import importlib
33
import pkgutil
4+
import sys
5+
46
from honeybee.logutil import get_logger
57

68

@@ -15,6 +17,7 @@
1517
try:
1618
extensions[name] = importlib.import_module(name)
1719
except Exception:
18-
logger.exception('Failed to import {0}!'.format(name))
20+
if (sys.version_info >= (3, 0)):
21+
logger.exception('Failed to import {0}!'.format(name))
1922
else:
2023
logger.info('Successfully imported Honeybee plugin: {}'.format(name))

0 commit comments

Comments
 (0)