Move GRAMPS_RESOURCE default into grampsapp.main()
This commit is contained in:
parent
dd55b367ce
commit
d71f9494b8
@ -25,7 +25,5 @@ able to run gramps from the source directory without setting PYTHONPATH
|
||||
|
||||
From this position, import gramps works great
|
||||
"""
|
||||
import os
|
||||
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(__file__))
|
||||
import gramps.grampsapp as app
|
||||
app.main()
|
||||
|
@ -442,6 +442,10 @@ def run():
|
||||
startcli(error, argpars)
|
||||
|
||||
def main():
|
||||
if 'GRAMPS_RESOURCES' not in os.environ:
|
||||
resource_path, filename = os.path.split(os.path.abspath(__file__))
|
||||
resource_path, dirname = os.path.split(resource_path)
|
||||
os.environ['GRAMPS_RESOURCES'] = resource_path
|
||||
errors = run()
|
||||
if errors and isinstance(errors, list):
|
||||
for error in errors:
|
||||
|
Loading…
Reference in New Issue
Block a user