Changeset - 9c5f794df7cd
[Not reviewed]
default
0 9 0
Mads Kiilerich - 9 years ago 2016-09-06 00:51:18
madski@unity3d.com
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.
9 files changed with 0 insertions and 44 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/cache_keys.py
Show inline comments
 
@@ -32,17 +32,12 @@ import sys
 

	
 
from kallithea.lib.paster_commands.common import BasePasterCommand
 
from kallithea.model.meta import Session
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/cleanup.py
Show inline comments
 
@@ -35,17 +35,12 @@ import datetime
 

	
 
from kallithea.lib.paster_commands.common import ask_ok, BasePasterCommand
 
from kallithea.lib.utils import REMOVED_REPO_PAT
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/install_iis.py
Show inline comments
 
@@ -21,16 +21,12 @@ IIS installation tools for Kallithea
 

	
 
import os
 
import sys
 
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
 
    max_args = 1
 
    min_args = 1
 
    summary = 'Setup IIS given a config file'
kallithea/lib/paster_commands/ishell.py
Show inline comments
 
@@ -28,17 +28,12 @@ Original author and date, and relevant c
 

	
 
import os
 
import sys
 

	
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/make_index.py
Show inline comments
 
@@ -31,17 +31,12 @@ import sys
 

	
 
from string import strip
 
from kallithea.model.repo import RepoModel
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/make_rcextensions.py
Show inline comments
 
@@ -29,17 +29,12 @@ Original author and date, and relevant c
 
import os
 
import sys
 
import pkg_resources
 

	
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/repo_scan.py
Show inline comments
 
@@ -30,17 +30,12 @@ import os
 
import sys
 

	
 
from kallithea.model.scm import ScmModel
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
kallithea/lib/paster_commands/setup_db.py
Show inline comments
 
@@ -22,17 +22,12 @@ Databaset setup paster command for Kalli
 
import os
 
import sys
 
from paste.script.appinstall import AbstractInstallCommand
 
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):
 

	
 
    default_verbosity = 1
 
    max_args = 1
 
    min_args = 1
kallithea/lib/paster_commands/update_repoinfo.py
Show inline comments
 
@@ -33,17 +33,12 @@ import string
 
from kallithea.lib.paster_commands.common import BasePasterCommand
 
from kallithea.lib.utils2 import safe_unicode
 
from kallithea.model.db import Repository
 
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):
 

	
 
    max_args = 1
 
    min_args = 1
 

	
0 comments (0 inline, 0 general)