summaryrefslogtreecommitdiff
path: root/grc/gui/FlowGraph.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-06-03 10:02:36 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-06-09 14:47:35 +0200
commit94c4606edd30dc8b1278580782f2809b69f04641 (patch)
tree6b7aa37b42f406c13d44b861aaf49ff54e9bb89b /grc/gui/FlowGraph.py
parent438dbd8839ad4c9079c5b8c2573bd9009b2b2e51 (diff)
grc: py3k compat using python-modernize
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r--grc/gui/FlowGraph.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 802c54f7a7..50e146b4db 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -17,16 +17,20 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
+from __future__ import absolute_import
+
import functools
import random
from distutils.spawn import find_executable
from itertools import chain, count
from operator import methodcaller
+import six
+from six.moves import filter
+
from gi.repository import GObject
-from . import Actions, Colors, Constants, Utils, Bars, Dialogs
-from .Constants import SCROLL_PROXIMITY_SENSITIVITY, SCROLL_DISTANCE
+from . import Actions, Colors, Utils, Bars, Dialogs
from .Element import Element
from .external_editor import ExternalEditor
@@ -179,10 +183,10 @@ class FlowGraph(Element, _Flowgraph):
x_min = min(x, x_min)
y_min = min(y, y_min)
#get connections between selected blocks
- connections = filter(
+ connections = list(filter(
lambda c: c.get_source().get_parent() in blocks and c.get_sink().get_parent() in blocks,
self.connections,
- )
+ ))
clipboard = (
(x_min, y_min),
[block.export_data() for block in blocks],
@@ -222,7 +226,7 @@ class FlowGraph(Element, _Flowgraph):
block.get_param('_io_cache').set_value(params.pop('_io_cache'))
block.get_param('_source_code').set_value(params.pop('_source_code'))
block.rewrite() # this creates the other params
- for param_key, param_value in params.iteritems():
+ for param_key, param_value in six.iteritems(params):
#setup id parameter
if param_key == 'id':
old_id2block[param_value] = block