summaryrefslogtreecommitdiff
path: root/pygnulib/GLConfig.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-31 22:29:15 +0200
committerBruno Haible <bruno@clisp.org>2022-07-31 23:52:53 +0200
commit79e45321bc42fd620bb0f808a1727fd3ae8f9fb0 (patch)
treed191619bf91d69650f95aacd52a2dda1f3aba494 /pygnulib/GLConfig.py
parente3d8f648354446ba56b4fb95eef9f3841b669806 (diff)
downloadgnulib-79e45321bc42fd620bb0f808a1727fd3ae8f9fb0.tar.gz
gnulib-tool.py: Use mainstream coding style.
* pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
Diffstat (limited to 'pygnulib/GLConfig.py')
-rw-r--r--pygnulib/GLConfig.py12
1 files changed, 6 insertions, 6 deletions
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__)