/[gentoo]/src/packages/query_package.py
Gentoo

Diff of /src/packages/query_package.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
9import ebuilddb 9import ebuilddb
10from MySQLdb import escape_string 10from MySQLdb import escape_string
11 11
12sys.stdout.write('Content-type: text/html; charset=iso-8859-1\n\n') 12sys.stdout.write('Content-type: text/html; charset=iso-8859-1\n\n')
13 13
14def cmp_results(a, b):
15 """Compare results a and b"""
16 category_a = a[0]
17 category_b = b[0]
18
19 order = cmp(category_a, category_b)
20 if order != 0:
21 return order
22
23
14def query_to_dict(q): 24def query_to_dict(q):
15 pkginfo = {} 25 pkginfo = {}
16 keys = ('category','name','homepage','description','license') 26 keys = ('category','name','homepage','description','license')
17 for i in range(len(keys)): 27 for i in range(len(keys)):
18 try: 28 try:
73 '<img ' 83 '<img '
74 'src="%s?category=404"' 84 'src="%s?category=404"'
75 'align="right" alt=""> <p>Information on the package you requested' 85 'align="right" alt=""> <p>Information on the package you requested'
76 ' could not be found. Be sure to check the' 86 ' could not be found. Be sure to check the'
77 ' <a HREF="%s">' 87 ' <a HREF="%s">'
78 'fresh ebuilds main page</a>.</p></td></tr></table>\n' 88 'packages.gentoo.org main page</a>.</p></td></tr></table>\n'
79 '</div>' % (config.ICONS,config.FEHOME)) 89 '</div>' % (config.ICONS,config.FEHOME))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20