# HG changeset patch # User Mads Kiilerich # Date 1473115878 -7200 # Node ID 9c5f794df7cd2483e895fd90f379d5e0b4482698 # Parent 4bcaf1ca2e080ef4141dae57e7eef46a9d0468dc paster: drop insertion of root path in sys.path Most paster commands inserted the root of the kallithea app in sys.path ... but only after loading all the Kallithea modules. That seems a bit pointless. diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/cache_keys.py --- a/kallithea/lib/paster_commands/cache_keys.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/cache_keys.py Tue Sep 06 00:51:18 2016 +0200 @@ -35,11 +35,6 @@ from kallithea.lib.utils2 import safe_str from kallithea.model.db import CacheInvalidation -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/cleanup.py --- a/kallithea/lib/paster_commands/cleanup.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/cleanup.py Tue Sep 06 00:51:18 2016 +0200 @@ -38,11 +38,6 @@ from kallithea.lib.utils2 import safe_str from kallithea.model.db import Ui -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/install_iis.py --- a/kallithea/lib/paster_commands/install_iis.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/install_iis.py Tue Sep 06 00:51:18 2016 +0200 @@ -24,10 +24,6 @@ from paste.script.appinstall import AbstractInstallCommand from paste.script.command import BadCommand -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) class Command(AbstractInstallCommand): default_verbosity = 1 diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/ishell.py --- a/kallithea/lib/paster_commands/ishell.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/ishell.py Tue Sep 06 00:51:18 2016 +0200 @@ -31,11 +31,6 @@ from kallithea.lib.paster_commands.common import BasePasterCommand -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/make_index.py --- a/kallithea/lib/paster_commands/make_index.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/make_index.py Tue Sep 06 00:51:18 2016 +0200 @@ -34,11 +34,6 @@ from kallithea.lib.paster_commands.common import BasePasterCommand from kallithea.lib.utils import load_rcextensions -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/make_rcextensions.py --- a/kallithea/lib/paster_commands/make_rcextensions.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/make_rcextensions.py Tue Sep 06 00:51:18 2016 +0200 @@ -32,11 +32,6 @@ from kallithea.lib.paster_commands.common import ask_ok, BasePasterCommand -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/repo_scan.py --- a/kallithea/lib/paster_commands/repo_scan.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/repo_scan.py Tue Sep 06 00:51:18 2016 +0200 @@ -33,11 +33,6 @@ from kallithea.lib.paster_commands.common import BasePasterCommand from kallithea.lib.utils import repo2db_mapper -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/setup_db.py --- a/kallithea/lib/paster_commands/setup_db.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/setup_db.py Tue Sep 06 00:51:18 2016 +0200 @@ -25,11 +25,6 @@ from paste.script.command import BadCommand from paste.deploy import appconfig -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(AbstractInstallCommand): diff -r 4bcaf1ca2e08 -r 9c5f794df7cd kallithea/lib/paster_commands/update_repoinfo.py --- a/kallithea/lib/paster_commands/update_repoinfo.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/paster_commands/update_repoinfo.py Tue Sep 06 00:51:18 2016 +0200 @@ -36,11 +36,6 @@ from kallithea.model.repo import RepoModel from kallithea.model.meta import Session -# Add location of top level folder to sys.path -from os.path import dirname -rc_path = dirname(dirname(dirname(os.path.realpath(__file__)))) -sys.path.append(rc_path) - class Command(BasePasterCommand):