commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 02/10: grc: Reload marks page as modified o


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/10: grc: Reload marks page as modified only if an error occured during import (i.e. ports no longer exist)
Date: Tue, 26 Aug 2014 19:40:07 +0000 (UTC)

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

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 3c165ab4a17473de1e642830c74027274f4a5a5c
Author: Seth Hitefield <address@hidden>
Date:   Mon Aug 25 16:34:45 2014 -0400

    grc: Reload marks page as modified only if an error occured during import 
(i.e. ports no longer exist)
---
 grc/base/FlowGraph.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/grc/base/FlowGraph.py b/grc/base/FlowGraph.py
index 519d399..78e7020 100644
--- a/grc/base/FlowGraph.py
+++ b/grc/base/FlowGraph.py
@@ -257,6 +257,7 @@ class FlowGraph(Element):
         Args:
             n: the nested data odict
         """
+        errors = False
         #remove previous elements
         self._elements = list()
         #use blank data if none provided
@@ -317,13 +318,13 @@ class FlowGraph(Element):
                 sink = sink_block.get_sink(sink_key)
                 #build the connection
                 self.connect(source, sink)
-            except LookupError, e: Messages.send_error_load(
-                'Connection between %s(%s) and %s(%s) could not be 
made.\n\t%s'%(
-                    source_block_id, source_key, sink_block_id, sink_key, e
-                )
-            )
+            except LookupError, e: 
+                Messages.send_error_load(
+                    'Connection between %s(%s) and %s(%s) could not be 
made.\n\t%s'%(
+                    source_block_id, source_key, sink_block_id, sink_key, e))
+                errors = True
         self.rewrite() #global rewrite
-
+        return errors
 
     def update_message_port_key(self, key, ports):
         """Backward compatibility for message port keys



reply via email to

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