[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.0.4-12-ga25cfc1
X2Go dev team
git-admin at x2go.org
Sun May 19 13:04:52 CEST 2013
The branch, build-main has been updated
via a25cfc15542296060bebe12ee62c91673c1908ac (commit)
from 871654331405e3dc1a4843a1238a494c2a5dbe48 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/utils.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
The diff of changes is:
diff --git a/x2gobroker/utils.py b/x2gobroker/utils.py
index 1a74ed8..2501070 100644
--- a/x2gobroker/utils.py
+++ b/x2gobroker/utils.py
@@ -80,3 +80,25 @@ def get_encoding():
encoding = 'ascii'
return encoding
+def compare_versions(version_a, op, version_b):
+ """\
+ Compare <version_a> with <version_b> using operator <op>.
+ In the background C{distutils.version.LooseVersion} is
+ used for the comparison operation.
+
+ @param version_a: a version string
+ @type version_a: C{str}
+ @param op: an operator provide as string (e.g. '<', '>', '==', '>=' etc.)
+ @type op: C{str}
+ @param version_b: another version string that is to be compared with <version_a>
+ @type version_b: C{str}
+
+ """
+
+ ### FIXME: this comparison is not reliable with beta et al. version strings
+
+ ver_a = distutils.version.LooseVersion(version_a)
+ ver_b = distutils.version.LooseVersion(version_b)
+
+ return eval("ver_a %s ver_b" % op)
+
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list