Fix inport errors and maintain compatibility with python 3.5x)

This commit is contained in:
Ellwood Zwovic
2017-07-22 20:14:09 -07:00
parent 6752108930
commit 06a05c81b2
4 changed files with 38 additions and 27 deletions

View File

@@ -1,11 +1,18 @@
from .exceptions import (
BpkgException,
InstallException,
DownloadException,
BadRepository,
)
from .types import (
import logging
log = logging.getLogger(__name__)
if 'bpy' in locals():
import importlib
log.debug("Reloading %s", __name__)
exceptions = importlib.reload(exceptions)
Package = importlib.reload(types.Package)
Repository = importlib.reload(types.Repository)
else:
from . import exceptions
from .types import (
Package,
Repository,
)