[library-web] misc: skip modules with an invalid version number
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] misc: skip modules with an invalid version number
- Date: Wed, 14 Nov 2018 07:23:14 +0000 (UTC)
commit 09a827110b8e1652c6f70baa3647e819b14ff703
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Nov 14 08:22:25 2018 +0100
misc: skip modules with an invalid version number
(like "2.2.0-alpha1", as version numbers should not contain dashes)
src/modtypes/base.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/modtypes/base.py b/src/modtypes/base.py
index deee453..ac6eefa 100644
--- a/src/modtypes/base.py
+++ b/src/modtypes/base.py
@@ -98,7 +98,11 @@ class DocModule(object):
self.version = 'nightly'
self.one_dot_version = 'nightly'
else:
- self.one_dot_version = re.match(r'\d+\.\d+', self.version).group()
+ try:
+ self.one_dot_version = re.match(r'\d+\.\d+', self.version).group()
+ except AttributeError:
+ logging.error('failed to parse version %s of module %s' % (self.modulename, self.version))
+ return None
if self.related_xsl_files:
self.mtime_xslt_files = max([os.stat(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]