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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue May 20 00:22:02 CEST 2014


Revision: 23665
          http://sourceforge.net/p/gar/code/23665
Author:   wahwah
Date:     2014-05-19 22:22:01 +0000 (Mon, 19 May 2014)
Log Message:
-----------
pkgdb: Random cleanup

Random cleanup done as part of other edits. This patch does not change any
functionality.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/checkpkg_lib.py
    csw/mgar/gar/v2/lib/python/models.py
    csw/mgar/gar/v2/lib/python/relational_util.py
    csw/mgar/gar/v2/lib/web/releases_web.py

Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2014-05-19 22:21:52 UTC (rev 23664)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2014-05-19 22:22:01 UTC (rev 23665)
@@ -32,6 +32,7 @@
 
 DESCRIPTION_RE = r"^([\S]+) - (.*)$"
 
+# This should be the same as the system configuration.
 SYS_DEFAULT_RUNPATH = [
     "/usr/lib/$ISALIST",
     "/usr/lib",
@@ -1163,7 +1164,7 @@
         sqo_srv4, osrel, arch, catrel, who)
     if not who:
       who = 'unknown'
-    # There are only i386 and sparc catalogs.
+    # There are only i386 and sparc architectures.
     if arch not in ('i386', 'sparc'):
       raise CatalogDatabaseError("Wrong architecture: %s" % arch)
     sqo_osrel, sqo_arch, sqo_catrel = self.GetSqlobjectTriad(

Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py	2014-05-19 22:21:52 UTC (rev 23664)
+++ csw/mgar/gar/v2/lib/python/models.py	2014-05-19 22:22:01 UTC (rev 23665)
@@ -289,8 +289,9 @@
     return CheckpkgOverride.select(CheckpkgOverride.q.srv4_file==self)
 
   def GetErrorTagsResult(self, os_rel, arch, catrel):
-    assert arch.name != 'all', ("Asked for the 'all' architecture, this is not valid "
-                                "for GetErrorTagsResult().")
+    assert arch.name != 'all', (
+        "Asked for the 'all' architecture, this is not valid "
+        "for GetErrorTagsResult().")
     return CheckpkgErrorTag.select(
         sqlobject.AND(
             CheckpkgErrorTag.q.srv4_file==self,

Modified: csw/mgar/gar/v2/lib/python/relational_util.py
===================================================================
--- csw/mgar/gar/v2/lib/python/relational_util.py	2014-05-19 22:21:52 UTC (rev 23664)
+++ csw/mgar/gar/v2/lib/python/relational_util.py	2014-05-19 22:22:01 UTC (rev 23665)
@@ -92,7 +92,7 @@
       maint_name = re.sub(r'^.*%s' % maint_name_magic_str, '', vendor_str)
     maintainer = models.Maintainer(email=maint_email, full_name=maint_name)
 
-  rev=None
+  rev = None
   if "revision_info" in parsed_basename:
     if "REV" in parsed_basename["revision_info"]:
       rev = parsed_basename["revision_info"]["REV"]

Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py	2014-05-19 22:21:52 UTC (rev 23664)
+++ csw/mgar/gar/v2/lib/web/releases_web.py	2014-05-19 22:22:01 UTC (rev 23665)
@@ -362,9 +362,7 @@
       web.header(
           'Content-Type',
           'application/x-vnd.opencsw.pkg;type=error-message')
-      response = cjson.encode({
-        "error_message": unicode(exc),
-      })
+      response = cjson.encode({"error_message": unicode(exc)})
       web.header('Content-Length', str(len(response)))
       # If we are in this state, there's a possibility that a package has been
       # removed from the database, and its replacesment has not been inserted.

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