From 79e45321bc42fd620bb0f808a1727fd3ae8f9fb0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 31 Jul 2022 22:29:15 +0200 Subject: [PATCH] gnulib-tool.py: Use mainstream coding style. * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception. --- ChangeLog | 3 +++ pygnulib/GLConfig.py | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) 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__) -- 2.39.5