Skip to content

Commit fa29c12

Browse files
authored
move import of etelemetry inside try block
In order to ingest the mindboggle parcellation labels into the NIF Ontology we run the following `from mindboggle.mio.labels import DKTprotocol as dkt`, which has no dependencies, and thus can be run by simply cloning this repository and not having to bother with installing a bunch of dependencies. Importing a dependency in the top level __init__ breaks this convenient behavior and also adds a network roundtrip for what should be a much simpler operation. This commit moves the etelemetry import inside the try/except block so that failure to import etelemetry does not prevent accessing static information in labels.py.
1 parent 7d3b57d commit fa29c12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mindboggle/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@
1818
# object imports
1919
#from .blah import blah, blah
2020

21-
import etelemetry
22-
2321
INIT_MSG = "Running {packname} version {version} (latest: {latest})".format
2422
latest = {"version": 'Unknown'}
2523
try:
2624
from .version import __version__
25+
import etelemetry
2726
latest = etelemetry.get_project("nipy/mindboggle")
2827
except Exception as e:
2928
print("Could not check for version updates: ", e)

0 commit comments

Comments
 (0)