From: Bruno Haible Date: Sun, 31 Jul 2022 20:29:15 +0000 (+0200) Subject: gnulib-tool.py: Use mainstream coding style. X-Git-Tag: v1.0~2195 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=79e45321bc42fd620bb0f808a1727fd3ae8f9fb0;p=gnulib.git gnulib-tool.py: Use mainstream coding style. * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception. --- diff --git a/ChangeLog b/ChangeLog index dd285f54f7..ba5540243e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2022-07-31 Bruno Haible + gnulib-tool.py: Use mainstream coding style. + * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception. + gnulib-tool.py: Implement options --symlink and --local-symlink. * gnulib-tool.py (main): Handle options --symlink and --local-symlink. * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 55b6cd2986..dc0cce3490 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -579,9 +579,9 @@ class GLConfig(object): except TypeError as error: self.table['modules'] = old_modules raise TypeError('each module must be a string') - except GLError as error: + except GLError: self.table['modules'] = old_modules - raise GLError(error.errno, error.errinfo) + raise else: # if type of modules is not list or tuple raise TypeError('modules must be a list or a tuple, not %s' % type(modules).__name__) @@ -625,9 +625,9 @@ class GLConfig(object): except TypeError as error: self.table['avoids'] = old_avoids raise TypeError('each module must be a string') - except GLError as error: + except GLError: self.table['avoids'] = old_avoids - raise GLError(error.errno, error.errinfo) + raise else: # if type of modules is not list or tuple raise TypeError('modules must be a list or a tuple, not %s' % type(modules).__name__) @@ -670,9 +670,9 @@ class GLConfig(object): except TypeError as error: self.table['files'] = old_files raise TypeError('each file must be a string') - except GLError as error: + except GLError: self.table['files'] = old_files - raise GLError(error.errno, error.errinfo) + raise else: # if type of files is not list or tuple raise TypeError('files must be a list or a tuple, not %s' % type(files).__name__)