Adding check on stanford license for information in __init__ and to stop processing
in insarApp.py and isceApp.py because of their dependencies on licensed code files.LT1AB
parent
4095681e39
commit
592befb882
11
__init__.py
11
__init__.py
|
@ -47,3 +47,14 @@ try:
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print('Using default ISCE Path: %s'%(isce_path))
|
print('Using default ISCE Path: %s'%(isce_path))
|
||||||
os.environ['ISCE_HOME'] = isce_path
|
os.environ['ISCE_HOME'] = isce_path
|
||||||
|
|
||||||
|
try:
|
||||||
|
from . license import stanford_license
|
||||||
|
except:
|
||||||
|
print("This is the Open Source version of ISCE.")
|
||||||
|
print("Some of the workflows depend on a separate licensed package.")
|
||||||
|
print("To obtain the licensed package, please make a request for ISCE")
|
||||||
|
print("through the website: https://download.jpl.nasa.gov/ops/request/index.cfm.")
|
||||||
|
print("Alternatively, if you are a member, or can become a member of WinSAR")
|
||||||
|
print("you may be able to obtain access to a version of the licensed sofware at")
|
||||||
|
print("https://winsar.unavco.org/software/isce")
|
||||||
|
|
|
@ -1197,6 +1197,13 @@ class Insar(_InsarBase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
if not isce.stanford_license:
|
||||||
|
print("This workflow requires the Stanford licensed code elemnts.")
|
||||||
|
print("Unable to find the license information in the isce.stanford_license file.")
|
||||||
|
print("Please either obtain a stanford license and follow the instructions to")
|
||||||
|
print("install the stanford code elements or else choose a different workflow.")
|
||||||
|
raise SystemExit(0)
|
||||||
|
else:
|
||||||
#make an instance of Insar class named 'insarApp'
|
#make an instance of Insar class named 'insarApp'
|
||||||
insar = Insar(name="insarApp")
|
insar = Insar(name="insarApp")
|
||||||
#configure the insar application
|
#configure the insar application
|
||||||
|
|
|
@ -1786,6 +1786,13 @@ class IsceApp(Application, FrameMixin):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
if not isce.stanford_license:
|
||||||
|
print("This workflow requires the Stanford licensed code elemnts.")
|
||||||
|
print("Unable to find the license information in the isce.stanford_license file.")
|
||||||
|
print("Please either obtain a stanford license and follow the instructions to")
|
||||||
|
print("install the stanford code elements or else choose a different workflow.")
|
||||||
|
raise SystemExit(0)
|
||||||
|
else:
|
||||||
#create the isce object
|
#create the isce object
|
||||||
isceapp = IsceApp(name='isceApp')
|
isceapp = IsceApp(name='isceApp')
|
||||||
#configure the isceapp object
|
#configure the isceapp object
|
||||||
|
|
Loading…
Reference in New Issue