Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 03c7be59b52dc9fb87015775eab75aad > files > 3

smart-1.4.1-8.mga3.src.rpm

--- smart-1.4.1/smart/fetcher.py.coercing2unicode~	2012-01-18 19:09:08.087911587 +0100
+++ smart-1.4.1/smart/fetcher.py	2012-01-18 19:33:57.334713142 +0100
@@ -970,8 +970,9 @@ class FTPHandler(FetcherHandler):
                             self._active[ftp] = url.host
                             thread.start_new_thread(self.connect,
                                                     (ftp, item, len(hostactive)))
+        pending = bool(self._queue or self._active)
         self._lock.release()
-        return bool(self._queue or self._active)
+        return pending
 
     def connect(self, ftp, item, active):
         item.start()
@@ -1152,8 +1153,9 @@ class URLLIBHandler(FetcherHandler):
                    self.changeActiveDownloads(+1)):
                 self._active += 1
                 thread.start_new_thread(self.fetch, ())
+        pending = bool(self._queue or self._active)
         self._lock.release()
-        return bool(self._queue or self._active)
+        return pending
 
     def fetch(self):
         import urllib, rfc822, calendar
@@ -1830,8 +1832,9 @@ class SCPHandler(FetcherHandler):
                     pass
                 else:
                     item.progress(size, item.total)
+        pending = bool(self._queue or self._active)
         self._lock.release()
-        return bool(self._queue or self._active)
+        return pending
 
     def fetch(self, item):
         from smart.util.ssh import SSH