SF.net SVN: gar:[23050] csw/mgar/gar/v2/lib/python

cgrzemba at users.sourceforge.net cgrzemba at users.sourceforge.net
Wed Feb 19 12:35:56 CET 2014


Revision: 23050
          http://sourceforge.net/p/gar/code/23050
Author:   cgrzemba
Date:     2014-02-19 11:35:52 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
add ssh options for batch mode, add missing plus sign

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/compare_catalog.py
    csw/mgar/gar/v2/lib/python/rest.py

Modified: csw/mgar/gar/v2/lib/python/compare_catalog.py
===================================================================
--- csw/mgar/gar/v2/lib/python/compare_catalog.py	2014-02-19 10:39:59 UTC (rev 23049)
+++ csw/mgar/gar/v2/lib/python/compare_catalog.py	2014-02-19 11:35:52 UTC (rev 23050)
@@ -16,21 +16,21 @@
 catalog_keys = ['catalogname','version','pkgname','file_basename',
                     'md5sum','size','deps','category','i_deps']
 
-def SplitPkgList(pkglist):
-      if not pkglist:
+def xxxSplitPkgList(pkglist):
+    if not pkglist:
         pkglist = ()
-      elif pkglist == "none":
+    elif pkglist == "none":
         pkglist = ()
-      else:
-        pkglist = tuple(pkglist.split("|"))
-      return pkglist
+    else:
+       pkglist = tuple(pkglist.split("|"))
+    return pkglist
 
 def convToDict(catlst):
     catdict = []
     for entry in catlst:
         del entry[9]
-	entry[6] = SplitPkgList(entry[6])
-	entry[8] = SplitPkgList(entry[8])
+	entry[6] = catalog.SplitPkgList(entry[6])
+	entry[8] = catalog.SplitPkgList(entry[8])
         catdict.append(dict(zip(catalog_keys,entry)))
     return catdict
 

Modified: csw/mgar/gar/v2/lib/python/rest.py
===================================================================
--- csw/mgar/gar/v2/lib/python/rest.py	2014-02-19 10:39:59 UTC (rev 23049)
+++ csw/mgar/gar/v2/lib/python/rest.py	2014-02-19 11:35:52 UTC (rev 23050)
@@ -72,7 +72,7 @@
   @retry_decorator.Retry(tries=DEFAULT_TRIES, exceptions=(RestCommunicationError, httplib.BadStatusLine))
   def GetCatalogData(self, md5_sum):
     self.ValidateMd5(md5_sum)
-    url = self.pkgdb_url "/srv4/%s/catalog-data/" % md5_sum
+    url = self.pkgdb_url + "/srv4/%s/catalog-data/" % md5_sum
     try:
       data = urllib2.urlopen(url).read()
       return cjson.decode(data)
@@ -536,7 +536,7 @@
 
   if password is None:
     # This part is specific to OpenCSW buildfarm.
-    args = ['ssh', 'login', 'cat', authfile]
+    args = ['ssh', '-o BatchMode=yes', '-o StrictHostKeyChecking=no', 'login', 'cat', authfile]
     ret_code, stdout, stderr = shell.ShellCommand(args)
     if not ret_code:
       password = stdout.strip()

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