summaryrefslogtreecommitdiff
path: root/git/exc.py
diff options
context:
space:
mode:
authorHarmon <Harmon758@gmail.com>2020-02-25 11:04:34 -0600
committerHarmon <Harmon758@gmail.com>2020-02-25 11:04:34 -0600
commitd39bd5345af82e3acbdc1ecb348951b05a5ed1f6 (patch)
treedfccb83bafd000d0704d473e1090a4158da136f9 /git/exc.py
parentac286162b577c35ce855a3048c82808b30b217a8 (diff)
downloadgitpython-d39bd5345af82e3acbdc1ecb348951b05a5ed1f6.tar.gz
Remove now unnecessary explicit Unicode string literal prefixes
Diffstat (limited to 'git/exc.py')
-rw-r--r--git/exc.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/git/exc.py b/git/exc.py
index f75ec5c9..71a40bdf 100644
--- a/git/exc.py
+++ b/git/exc.py
@@ -34,8 +34,8 @@ class CommandError(GitError):
#: A unicode print-format with 2 `%s for `<cmdline>` and the rest,
#: e.g.
- #: u"'%s' failed%s"
- _msg = u"Cmd('%s') failed%s"
+ #: "'%s' failed%s"
+ _msg = "Cmd('%s') failed%s"
def __init__(self, command, status=None, stderr=None, stdout=None):
if not isinstance(command, (tuple, list)):
@@ -44,19 +44,19 @@ class CommandError(GitError):
self.status = status
if status:
if isinstance(status, Exception):
- status = u"%s('%s')" % (type(status).__name__, safe_decode(str(status)))
+ status = "%s('%s')" % (type(status).__name__, safe_decode(str(status)))
else:
try:
- status = u'exit code(%s)' % int(status)
+ status = 'exit code(%s)' % int(status)
except (ValueError, TypeError):
s = safe_decode(str(status))
- status = u"'%s'" % s if isinstance(status, str) else s
+ status = "'%s'" % s if isinstance(status, str) else s
self._cmd = safe_decode(command[0])
- self._cmdline = u' '.join(safe_decode(i) for i in command)
- self._cause = status and u" due to: %s" % status or "!"
- self.stdout = stdout and u"\n stdout: '%s'" % safe_decode(stdout) or ''
- self.stderr = stderr and u"\n stderr: '%s'" % safe_decode(stderr) or ''
+ self._cmdline = ' '.join(safe_decode(i) for i in command)
+ self._cause = status and " due to: %s" % status or "!"
+ self.stdout = stdout and "\n stdout: '%s'" % safe_decode(stdout) or ''
+ self.stderr = stderr and "\n stderr: '%s'" % safe_decode(stderr) or ''
def __str__(self):
return (self._msg + "\n cmdline: %s%s%s") % (
@@ -68,7 +68,7 @@ class GitCommandNotFound(CommandError):
the GIT_PYTHON_GIT_EXECUTABLE environment variable"""
def __init__(self, command, cause):
super(GitCommandNotFound, self).__init__(command, cause)
- self._msg = u"Cmd('%s') not found%s"
+ self._msg = "Cmd('%s') not found%s"
class GitCommandError(CommandError):
@@ -118,7 +118,7 @@ class HookExecutionError(CommandError):
def __init__(self, command, status, stderr=None, stdout=None):
super(HookExecutionError, self).__init__(command, status, stderr, stdout)
- self._msg = u"Hook('%s') failed%s"
+ self._msg = "Hook('%s') failed%s"
class RepositoryDirtyError(GitError):