diff options
author | Bruno Haible <bruno@clisp.org> | 2022-07-30 13:29:26 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-07-31 07:07:40 +0200 |
commit | 0a624ee7dc62a19d28651542f2c627b6de9a18d7 (patch) | |
tree | aee70730c7c022209c493f1f6538593d3334a152 /pygnulib/GLMakefileTable.py | |
parent | d2abfb903c5bd24fb6b39e39bb2af15ee4c6a14f (diff) | |
download | gnulib-0a624ee7dc62a19d28651542f2c627b6de9a18d7.tar.gz |
gnulib-tool.py: Assume Python 3.
* gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'.
* pygnulib/*.py: Likewise.
Diffstat (limited to 'pygnulib/GLMakefileTable.py')
-rw-r--r-- | pygnulib/GLMakefileTable.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/pygnulib/GLMakefileTable.py b/pygnulib/GLMakefileTable.py index c535180f1f..95ceeeee63 100644 --- a/pygnulib/GLMakefileTable.py +++ b/pygnulib/GLMakefileTable.py @@ -42,7 +42,6 @@ __copyright__ = constants.__copyright__ NoneType = type(None) APP = constants.APP DIRS = constants.DIRS -ENCS = constants.ENCS UTILS = constants.UTILS MODES = constants.MODES TESTS = constants.TESTS @@ -87,22 +86,13 @@ class GLMakefileTable(object): This method is used to remember that ${dir}Makefile.am needs to be edited to that ${var} mentions ${val}.''' - if type(dir) is bytes or type(dir) is str: - if type(dir) is bytes: - dir = dir.decode(ENCS['default']) - else: # if dir has not bytes or str type + if type(dir) is not str: raise TypeError( 'dir must be a string, not %s' % (type(dir).__name__)) - if type(var) is bytes or type(var) is str: - if type(var) is bytes: - var = var.decode(ENCS['default']) - else: # if var has not bytes or str type + if type(var) is not str: raise TypeError( 'var must be a string, not %s' % (type(var).__name__)) - if type(val) is bytes or type(val) is str: - if type(val) is bytes: - val = val.decode(ENCS['default']) - else: # if val has not bytes or str type + if type(val) is not str: raise TypeError( 'val must be a string, not %s' % (type(val).__name__)) dictionary = {'dir': dir, 'var': var, 'val': val} |