From a968e4fadb618fa57bea2ab03b1190233e6a2bb5 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 16 Oct 2015 22:44:43 +0200 Subject: [PATCH] Added it to scan.py too --- api/source/scan.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/source/scan.py b/api/source/scan.py index 58fd3ec..8ca9304 100755 --- a/api/source/scan.py +++ b/api/source/scan.py @@ -82,8 +82,11 @@ def progress(queue, number): def main(): modules = [] - path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0], - '..', '..', '..', '..', 'openlp', 'trunk')) + if 'OPENLP_SOURCE' in os.environ: + path_to_code = os.path.abspath(os.environ['OPENLP_SOURCE']) + else: + path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0], + '..', '..', '..', '..', 'openlp', 'trunk')) if not os.path.exists(path_to_code): print('Incorrect path to code, expecting "%s"' % path_to_code) sys.exit(1) @@ -118,3 +121,4 @@ def main(): if __name__ == '__main__': main() +