diff options
author | 2004-10-17 16:53:21 +0000 | |
---|---|---|
committer | 2004-10-17 16:53:21 +0000 | |
commit | 684f192b00ca62a46ef5c7df6ce8c08a54923308 (patch) | |
tree | e994615a00afc6cd604d10d20b522c4271b367bc /src/packages/query_package.py | |
parent | Add "Tips & Tricks" part (diff) | |
download | gentoo-684f192b00ca62a46ef5c7df6ce8c08a54923308.tar.gz gentoo-684f192b00ca62a46ef5c7df6ce8c08a54923308.tar.bz2 gentoo-684f192b00ca62a46ef5c7df6ce8c08a54923308.zip |
Various fixes & enhancements
Diffstat (limited to 'src/packages/query_package.py')
-rw-r--r-- | src/packages/query_package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/packages/query_package.py b/src/packages/query_package.py index f78af3d940..c30f175cdc 100644 --- a/src/packages/query_package.py +++ b/src/packages/query_package.py @@ -11,6 +11,16 @@ from MySQLdb import escape_string sys.stdout.write('Content-type: text/html; charset=iso-8859-1\n\n') +def cmp_results(a, b): + """Compare results a and b""" + category_a = a[0] + category_b = b[0] + + order = cmp(category_a, category_b) + if order != 0: + return order + + def query_to_dict(q): pkginfo = {} keys = ('category','name','homepage','description','license') @@ -75,5 +85,5 @@ else: 'align="right" alt=""> <p>Information on the package you requested' ' could not be found. Be sure to check the' ' <a HREF="%s">' - 'fresh ebuilds main page</a>.</p></td></tr></table>\n' + 'packages.gentoo.org main page</a>.</p></td></tr></table>\n' '</div>' % (config.ICONS,config.FEHOME)) |