Changeset - cb4a0de6ca8e
[Not reviewed]
default
0 3 0
Mads Kiilerich - 6 years ago 2019-08-04 18:43:33
mads@kiilerich.com
Grafted from: 388923b8d43e
pylint: fix W0715(raising-format-tuple) Exception arguments suggest string formatting might be intended

kallithea/lib/utils2.py:453: W0715(raising-format-tuple) in get_changeset_safe: Exception arguments suggest string formatting might be intended
kallithea/lib/vcs/backends/git/changeset.py:360: W0715(raising-format-tuple) in GitChangeset.fill_archive: Exception arguments suggest string formatting might be intended
kallithea/lib/vcs/backends/hg/changeset.py:322: W0715(raising-format-tuple) in MercurialChangeset.fill_archive: Exception arguments suggest string formatting might be intended
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils2.py
Show inline comments
 
@@ -448,13 +448,13 @@ def get_changeset_safe(repo, rev):
 
    """
 
    from kallithea.lib.vcs.backends.base import BaseRepository
 
    from kallithea.lib.vcs.exceptions import RepositoryError
 
    from kallithea.lib.vcs.backends.base import EmptyChangeset
 
    if not isinstance(repo, BaseRepository):
 
        raise Exception('You must pass an Repository '
 
                        'object as first argument got %s', type(repo))
 
                        'object as first argument got %s' % type(repo))
 

	
 
    try:
 
        cs = repo.get_changeset(rev)
 
    except (RepositoryError, LookupError):
 
        cs = EmptyChangeset(requested_revision=rev)
 
    return cs
kallithea/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -355,13 +355,13 @@ class GitChangeset(BaseChangeset):
 
        :raise VcsError: If given stream is None
 

	
 
        """
 
        allowed_kinds = settings.ARCHIVE_SPECS.keys()
 
        if kind not in allowed_kinds:
 
            raise ImproperArchiveTypeError('Archive kind not supported use one'
 
                'of %s', allowed_kinds)
 
                'of %s' % allowed_kinds)
 

	
 
        if prefix is None:
 
            prefix = '%s-%s' % (self.repository.name, self.short_id)
 
        elif prefix.startswith('/'):
 
            raise VCSError("Prefix cannot start with leading slash")
 
        elif prefix.strip() == '':
kallithea/lib/vcs/backends/hg/changeset.py
Show inline comments
 
@@ -317,13 +317,13 @@ class MercurialChangeset(BaseChangeset):
 
        :raise VcsError: If given stream is None
 
        """
 

	
 
        allowed_kinds = settings.ARCHIVE_SPECS.keys()
 
        if kind not in allowed_kinds:
 
            raise ImproperArchiveTypeError('Archive kind not supported use one'
 
                'of %s', allowed_kinds)
 
                'of %s' % allowed_kinds)
 

	
 
        if stream is None:
 
            raise VCSError('You need to pass in a valid stream for filling'
 
                           ' with archival data')
 

	
 
        if prefix is None:
0 comments (0 inline, 0 general)