Skip to content
Snippets Groups Projects
Commit bd0143b1 authored by ac (tb)'s avatar ac (tb)
Browse files

python leversc try except package module

parent 548b5877
No related branches found
No related tags found
No related merge requests found
......@@ -370,9 +370,17 @@ class leversc:
if ( ljs_m is None ):
return None
return ljs_m.get_ljspath()
# if we are running from inside the source tree then there is package/module confusion
# resolve that with try/except here
try:
# using package
from leversc._readImage import readImage
from leversc._property import setProperty,getProperty
except:
# running from source tree (leversc resolves as a module)
from _readImage import readImage
from _property import setProperty,getProperty
@property
def viewParams(self):
return self.getProperty('viewParams')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment