summaryrefslogtreecommitdiff
path: root/pygnulib/GLError.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-30 11:45:36 +0200
committerBruno Haible <bruno@clisp.org>2022-07-31 07:07:32 +0200
commitd2abfb903c5bd24fb6b39e39bb2af15ee4c6a14f (patch)
tree1db34d26a010db73104b680fcd766c3e37b880b0 /pygnulib/GLError.py
parent5d39cdb46a0ab98506d1be1cbf6ec58950ff93e4 (diff)
downloadgnulib-d2abfb903c5bd24fb6b39e39bb2af15ee4c6a14f.tar.gz
gnulib-tool.py: Assume Python 3.
* gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string. * pygnulib/*.py: Likewise.
Diffstat (limited to 'pygnulib/GLError.py')
-rw-r--r--pygnulib/GLError.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/pygnulib/GLError.py b/pygnulib/GLError.py
index 66838e56e6..5c1f9a72c3 100644
--- a/pygnulib/GLError.py
+++ b/pygnulib/GLError.py
@@ -35,7 +35,6 @@ __copyright__ = constants.__copyright__
#===============================================================================
# Define global constants
#===============================================================================
-PYTHON3 = constants.PYTHON3
NoneType = type(None)
APP = constants.APP
DIRS = constants.DIRS
@@ -46,7 +45,6 @@ TESTS = constants.TESTS
compiler = constants.compiler
joinpath = constants.joinpath
cleaner = constants.cleaner
-string = constants.string
isabs = os.path.isabs
isdir = os.path.isdir
isfile = os.path.isfile
@@ -118,10 +116,5 @@ class GLError(Exception):
"module lacks a license: %s" % repr(errinfo),
"error when running subprocess: %s" % repr(errinfo),
] # Complete list of errors
- if not PYTHON3:
- self.message = (b'[Errno %d] %s' %
- (self.errno, errors[self.errno - 1].encode(ENCS['default'])))
- else: # if PYTHON3
- self.message = ('[Errno %d] %s' %
- (self.errno, errors[self.errno - 1]))
+ self.message = '[Errno %d] %s' % (self.errno, errors[self.errno - 1])
return self.message