]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Use mainstream coding style.
authorBruno Haible <bruno@clisp.org>
Sun, 31 Jul 2022 20:29:15 +0000 (22:29 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 31 Jul 2022 21:52:53 +0000 (23:52 +0200)
* pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.

ChangeLog
pygnulib/GLConfig.py

index dd285f54f7845e2dcf393f7a628ff01d035a70ad..ba5540243e3783b4502d232bfd3a64b29f23869e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2022-07-31  Bruno Haible  <bruno@clisp.org>
 
+       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
index 55b6cd298698eb1cd08dcbad1559fe9267455eb5..dc0cce34903643f1bcf45704ccef4e00a6f501b3 100644 (file)
@@ -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__)