diff --git a/kallithea/lib/utils.py b/kallithea/lib/utils.py --- a/kallithea/lib/utils.py +++ b/kallithea/lib/utils.py @@ -376,7 +376,6 @@ def set_app_settings(config): :param config: """ hgsettings = Setting.get_app_settings() - for k, v in hgsettings.items(): config[k] = v diff --git a/kallithea/lib/utils2.py b/kallithea/lib/utils2.py --- a/kallithea/lib/utils2.py +++ b/kallithea/lib/utils2.py @@ -154,12 +154,10 @@ def safe_int(val, default=None): :param val: :param default: """ - try: val = int(val) except (ValueError, TypeError): val = default - return val diff --git a/kallithea/lib/vcs/backends/git/inmemory.py b/kallithea/lib/vcs/backends/git/inmemory.py --- a/kallithea/lib/vcs/backends/git/inmemory.py +++ b/kallithea/lib/vcs/backends/git/inmemory.py @@ -184,8 +184,8 @@ class GitInMemoryChangeset(BaseInMemoryC return obj else: raise RepositoryError("Cannot create directory %s " - "at tree %s as path is occupied and is not a " - "Tree" % (dirname, tree)) + "at tree %s as path is occupied and is not a " + "Tree" % (dirname, tree)) return None trees = [] diff --git a/kallithea/lib/vcs/backends/git/repository.py b/kallithea/lib/vcs/backends/git/repository.py --- a/kallithea/lib/vcs/backends/git/repository.py +++ b/kallithea/lib/vcs/backends/git/repository.py @@ -214,7 +214,7 @@ class GitRepository(BaseRepository): gitdata = resp.read() if 'service=git-upload-pack' not in gitdata: raise urllib2.URLError( - "url [%s] does not look like an git" % (cleaned_uri)) + "url [%s] does not look like an git" % cleaned_uri) return True diff --git a/kallithea/lib/vcs/subprocessio.py b/kallithea/lib/vcs/subprocessio.py --- a/kallithea/lib/vcs/subprocessio.py +++ b/kallithea/lib/vcs/subprocessio.py @@ -377,8 +377,7 @@ class SubprocessIOChunker(object): bg_out = iter([out]) _p = None elif err: - raise EnvironmentError( - "Subprocess exited due to an error:\n" + err) + raise EnvironmentError("Subprocess exited due to an error: %s" % err) else: raise EnvironmentError( "Subprocess exited with non 0 ret code: %s" % returncode) diff --git a/kallithea/lib/vcs/utils/__init__.py b/kallithea/lib/vcs/utils/__init__.py --- a/kallithea/lib/vcs/utils/__init__.py +++ b/kallithea/lib/vcs/utils/__init__.py @@ -25,7 +25,7 @@ def aslist(obj, sep=None, strip=True): :param sep: :param strip: """ - if isinstance(obj, (basestring)): + if isinstance(obj, basestring): lst = obj.split(sep) if strip: lst = [v.strip() for v in lst]