[rtems-tools commit] rtemstoolkit: Fix the parsing of the revision string to a number.

Chris Johns chrisj at rtems.org
Mon Nov 5 04:40:26 UTC 2018


Module:    rtems-tools
Branch:    master
Commit:    087be8c67f04d9f3457e9c74a97e636bec202ead
Changeset: http://git.rtems.org/rtems-tools/commit/?id=087be8c67f04d9f3457e9c74a97e636bec202ead

Author:    Chris Johns <chrisj at rtems.org>
Date:      Mon Nov  5 15:37:49 2018 +1100

rtemstoolkit: Fix the parsing of the revision string to a number.

Fix provided by Amar on the user list:

 https://lists.rtems.org/pipermail/users/2018-October/032714.html

---

 rtemstoolkit/version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtemstoolkit/version.py b/rtemstoolkit/version.py
index d538d2a..6f76c84 100644
--- a/rtemstoolkit/version.py
+++ b/rtemstoolkit/version.py
@@ -171,7 +171,7 @@ def _load_released_version():
                 raise error.general('Invalid version config value: %s: %s' % (vc,
                                                                               ver))
             try:
-                _revision = int(''.join(itertools.takewhile(str.isdigit, rev)))
+                _revision = int(''.join(itertools.takewhile(str.isdigit, str(rev))))
             except Exception as e:
                 raise error.general('Invalid revision config value: %s: %s: %s' % (vc,
                                                                                    rev,




More information about the vc mailing list