mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #8876 from ic4f/sg_running_from_source
Do not raise Exception to manage control flow
This commit is contained in:
@@ -190,14 +190,8 @@ class NicerConfigParser(ConfigParser):
|
||||
|
||||
|
||||
def _running_from_source():
|
||||
try:
|
||||
# is there a better way to do this?
|
||||
assert os.path.exists('run.sh')
|
||||
assert os.path.exists('lib/galaxy/__init__.py')
|
||||
assert os.path.exists('scripts/common_startup.sh')
|
||||
return True
|
||||
except AssertionError:
|
||||
return False
|
||||
paths = ['run.sh', 'lib/galaxy/__init__.py', 'scripts/common_startup.sh']
|
||||
return all(map(os.path.exists, paths))
|
||||
|
||||
|
||||
running_from_source = _running_from_source()
|
||||
|
||||
Reference in New Issue
Block a user