diff --git a/premise/ecoinvent_modification.py b/premise/ecoinvent_modification.py index c8c5abe9..a57b4040 100644 --- a/premise/ecoinvent_modification.py +++ b/premise/ecoinvent_modification.py @@ -54,16 +54,11 @@ logger = logging.getLogger("module") -try: - import bw2data - - major_version = int(bw2data.__version__[0]) - assert major_version >= 4 - +import bw2data +if int(bw2data.__version__[0]) >= 4: from .brightway25 import write_brightway_database logger.info("Using Brightway 2.5") - -except AssertionError: +else: from .brightway2 import write_brightway_database logger.info("Using Brightway 2")