Merge commit 'f90f6b856d' into mead

Conflicts:
	cli/koji
	docs/schema.sql
	hub/kojihub.py
	koji.spec
	www/kojiweb/index.py
	www/kojiweb/taskinfo.chtml
This commit is contained in:
Mike McLean 2010-04-08 17:12:49 -04:00
commit c742272ac6
22 changed files with 1913 additions and 899 deletions

View file

@ -39,7 +39,8 @@ def formatChangelog(entries):
result += """* %s %s
%s
""" % (_changelogDate(entry['date']), entry['author'], entry['text'])
""" % (_changelogDate(entry['date']), entry['author'].encode("utf-8"),
entry['text'].encode("utf-8"))
return result
@ -99,6 +100,15 @@ def printList(l):
ret += l[-1]
return ret
def dslice(dict, keys, strict=True):
"""Returns a new dictionary containing only the specified keys"""
ret = {}
for key in keys:
if strict or dict.has_key(key):
#for strict we skip the has_key check and let the dict generate the KeyError
ret[key] = dict[key]
return ret
def eventFromOpts(session, opts):
"""Determine event id from standard cli options