summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-06-01 17:31:37 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-06-01 17:31:37 +0200
commite1f8d27b05abfa6ea4da792ed58be192500ab86b (patch)
treeaef0e36c5b156dd5d24f68ef931654540efe169b /doc
parent015acac98dc88fbbca5672c6be678c8dea491a8e (diff)
downloadpython-apt-e1f8d27b05abfa6ea4da792ed58be192500ab86b.tar.gz
* doc/source/conf.py:
- do not fail for non digit version numbers like 0.7.95ubuntu1
Diffstat (limited to 'doc')
-rw-r--r--doc/source/conf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 5f82d5eb..05490da7 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -78,7 +78,8 @@ except KeyError:
release = p2.communicate()[0]
# Handle the alpha release scheme
-if int(release.split("~")[0].split(".")[2]) >= 90:
+release_raw = release.split("~")[0].split(".")[2]
+if release_raw.isdigit() and int(release_raw) >= 90:
version_s = release.split("~")[0].split(".")[:3]
# Set the version to 0.X.100 if the release is 0.X.9Y (0.7.90 => 0.7.100)
# Use
@@ -90,6 +91,7 @@ if int(release.split("~")[0].split(".")[2]) >= 90:
del version_s
else:
version = '.'.join(release.split("~")[0].split('.')[:3])
+del release_raw
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.