[csw-devel] SF.net SVN: gar:[18140] csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap. py

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sun May 27 23:50:41 CEST 2012


Revision: 18140
          http://gar.svn.sourceforge.net/gar/?rev=18140&view=rev
Author:   chninkel
Date:     2012-05-27 21:50:40 +0000 (Sun, 27 May 2012)
Log Message:
-----------
no, None is not iterable...

Modified Paths:
--------------
    csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py

Modified: csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py
===================================================================
--- csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py	2012-05-27 21:47:40 UTC (rev 18139)
+++ csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py	2012-05-27 21:50:40 UTC (rev 18140)
@@ -268,6 +268,8 @@
     streams_and_parsers = zip(streams, (self._ParsePkgmapLine, self._ParsePkgContentsLine))
     for stream_info in streams_and_parsers:
       parseMethod = stream_info[1]
+      if stream_info[0] == None:
+        continue
       for line in stream_info[0]:
         if show_progress:
           if not c.next() % 1000:
@@ -377,9 +379,10 @@
     for line in streams[0]:
       pkgname, pkg_desc = self._ParsePkginfoLine(line)
       packages_by_pkgname.setdefault(pkgname, pkg_desc)
-    for line in streams[1]:
-      pkgname, pkg_desc = self._ParsePkgListLine(line)
-      packages_by_pkgname.setdefault(pkgname, pkg_desc)
+    if streams[1] != None:
+      for line in streams[1]:
+        pkgname, pkg_desc = self._ParsePkgListLine(line)
+        packages_by_pkgname.setdefault(pkgname, pkg_desc)
     logging.debug("<- _ParsePkginfoOutput()")
     return packages_by_pkgname
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list