meld r1300 - trunk



Author: vincele
Date: Sat Mar 28 00:42:27 2009
New Revision: 1300
URL: http://svn.gnome.org/viewvc/meld?rev=1300&view=rev

Log:
No need for a generator function, the
scheduler accept normal functions too.

Return False insted of raising StopIteration

Remove unreachable yield statement


Modified:
   trunk/filediff.py

Modified: trunk/filediff.py
==============================================================================
--- trunk/filediff.py	(original)
+++ trunk/filediff.py	Sat Mar 28 00:42:27 2009
@@ -198,12 +198,9 @@
             # Abbreviation for line, column so that it will fit in the status bar
             line_column = _("Ln %i, Col %i") % (it.get_line()+1, it.get_line_offset()+1)
             status = "%s : %s" % ( insert_overwrite, line_column )
-            self.emit("status-changed", status  )
-            raise StopIteration
-            # Unreachable code, used for the side-effect
-            # of making this function a generator
-            yield 0 # pylint: disable-msg=W0101
-        self.scheduler.add_task( update().next )
+            self.emit("status-changed", status)
+            return False
+        self.scheduler.add_task(update)
 
     def on_textbuffer_mark_set(self, buffer, it, mark):
         if mark.get_name() == "insert":



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