summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-07-23 16:32:54 +0200
committerJulian Andres Klode <jak@debian.org>2010-07-23 16:32:54 +0200
commitd4982e0e6d4b4fefb55043bb999784f5cfb2b686 (patch)
treee1b1494fd819218e3f61d52ba102bb4901443796
parent7219ee607e72438bbbb755caebdc7f617ee440f4 (diff)
downloadpython-apt-d4982e0e6d4b4fefb55043bb999784f5cfb2b686.tar.gz
* doc/conf.py:
- Correctly handle non-digit characters in version (ignore everything after them).
-rw-r--r--debian/changelog3
-rw-r--r--doc/source/conf.py9
2 files changed, 10 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index cb2bcebb..c76efa37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ python-apt (0.7.97) UNRELEASED; urgency=low
* python/tag.cc:
- Support gzip compression for control files (Closes: #383617),
requires APT (>> 0.7.26~exp10) to work.
+ * doc/conf.py:
+ - Correctly handle non-digit characters in version (ignore everything
+ after them).
-- Julian Andres Klode <jak@debian.org> Fri, 23 Jul 2010 16:14:39 +0200
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 05490da7..18c8642e 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -78,8 +78,13 @@ except KeyError:
release = p2.communicate()[0]
# Handle the alpha release scheme
-release_raw = release.split("~")[0].split(".")[2]
-if release_raw.isdigit() and int(release_raw) >= 90:
+release_raw = "0"
+for c in release.split("~")[0].split(".")[2]:
+ if not c.isdigit():
+ break
+ release_raw += c
+
+if 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