commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/02: float(version) doesn't work with "1.


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/02: float(version) doesn't work with "1.9.0"; fixed nx version checking
Date: Thu, 14 Apr 2016 21:23:31 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 1f1e9f7c1550ef9bd851329f9e0c5c1c37085072
Author: Marcus Müller <address@hidden>
Date:   Wed Apr 13 18:19:46 2016 +0200

    float(version) doesn't work with "1.9.0"; fixed nx version checking
---
 gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx 
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index cc9f76f..cf67584 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012-2013 Free Software Foundation, Inc.
+# Copyright 2012-2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -53,7 +53,16 @@ import itertools
 from gnuradio import gr, ctrlport
 from gnuradio.ctrlport.GrDataPlotter import *
 
-if float(nx.__version__) >= 1.11:
+#check for networkx version
+_critical_version = (1,11)
+_atleast_critical = False
+
+for act,ref in zip(nx.__version__.split("."), _critical_version):
+    _atleast_critical = (act >= ref)
+    if not act == ref:
+        break
+
+if _atleast_critical:
     from networkx.drawing.nx_agraph import graphviz_layout
 else:
     graphviz_layout = nx.graphviz_layout



reply via email to

[Prev in Thread] Current Thread [Next in Thread]