From: Philippe Proulx Date: Fri, 30 Oct 2015 03:46:47 +0000 (-0400) Subject: Fix: _split_version_suffix() may return 1 element X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7e0b65d1284d77b160e70af975ab98e4c161c6cc;p=deliverable%2Fbarectf.git Fix: _split_version_suffix() may return 1 element Signed-off-by: Philippe Proulx --- diff --git a/barectf/__init__.py b/barectf/__init__.py index 2ec0aae..e0a910f 100644 --- a/barectf/__init__.py +++ b/barectf/__init__.py @@ -24,7 +24,14 @@ __version__ = '2.0.1' def _split_version_suffix(): - return __version__.split('-') + parts = __version__.split('-') + version = parts[0] + suffix = None + + if len(parts) == 2: + suffix = parts[1] + + return version, suffix def get_version_tuple():