conduit r1753 - in branches/gnome-2-24: . conduit/platform



Author: jstowers
Date: Tue Oct  7 20:37:18 2008
New Revision: 1753
URL: http://svn.gnome.org/viewvc/conduit?rev=1753&view=rev

Log:
2008-10-07  John Stowers  <john stowers gmail com>

	* conduit/platform/FileGio.py: Close the FileEnumerator.
	Fixes #555305



Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/conduit/platform/FileGio.py

Modified: branches/gnome-2-24/conduit/platform/FileGio.py
==============================================================================
--- branches/gnome-2-24/conduit/platform/FileGio.py	(original)
+++ branches/gnome-2-24/conduit/platform/FileGio.py	Tue Oct  7 20:37:18 2008
@@ -298,8 +298,11 @@
                 log.warn("Folder %s Not found" % dir, exc_info=True)
                 continue
 
-            try: fileinfo = enumerator.next()
-            except StopIteration: continue;
+            try: 
+                fileinfo = enumerator.next()
+            except StopIteration:
+                enumerator.close()
+                continue
             while fileinfo:
                 filename = fileinfo.get_name()
                 filetype = fileinfo.get_file_type()
@@ -317,8 +320,11 @@
                                 self.URIs.append(uri)
                     else:
                         log.debug("Unsupported file type: %s (%s)" % (filename, filetype))
-                try: fileinfo = enumerator.next()
-                except StopIteration: break;
+                try: 
+                    fileinfo = enumerator.next()
+                except StopIteration:
+                    enumerator.close()
+                    break
 
             #Calculate the estimated complete percentags
             estimated = 1.0-float(len(self.dirs))/float(t)



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