Example #1
0
def get_usertag(email):
	ret = query("get_usertag", email)
	serialize = dict()
	if isinstance(ret._aslist()[0][0], int):
		for pair in ret._asdict():
			serialize[pair] = ret._asdict()[pair]._aslist()
	else:
		for pair in ret._aslist()[0]:
			serialize[pair['key']] = pair['value']._aslist()
	return emit(serialize, True)
Example #2
0
def get_status(bugnumber):
	ret = query("get_status", bugnumber)
	serialize = dict()
	for key in ret._asdict()['item']._asdict()['value']._asdict():
		value = ret._asdict()['item']._asdict()['value']._asdict()[key]
		if isinstance(value, basestring) or isinstance(value, int) or type(value) is list:
			serialize[key] = value
		else:
			serialize[key] = value._asdict()
	return emit(serialize, True)
Example #3
0
def get_bug_log(bugnumber):
	ret = query("get_bug_log", bugnumber)
	serialize = []
	for message in ret:
		messagedict = dict()
		for key in message._asdict():
			if isinstance(message[key], basestring) or isinstance(message[key], int):
				messagedict[key]=message[key]
			else:
				messagedict[key]=message[key]._aslist()
		serialize.append(messagedict)
	return emit(serialize, True)
Example #4
0
def get_bugs(conditions):
	conditions = conditions.split(',')
	return emit(query("get_bugs", conditions)._aslist(), True)
Example #5
0
File: pts.py Project: paultag/deapi
def bug_counts(source_name):
    return emit(query("bug_counts", source_name), True)
Example #6
0
File: pts.py Project: paultag/deapi
def versions(source_name):
    ret = query("versions", source_name)
    if isinstance(ret, basestring):
        ret = {"unstable": ret}  # This is a dirty, dirty lie.
    return emit(ret, True)
Example #7
0
File: pts.py Project: paultag/deapi
def binary_names(source_name):
    ret = query("binary_names", source_name)
    if isinstance(ret, basestring):
        ret = ret.split()
    return emit(ret, True)
Example #8
0
File: pts.py Project: paultag/deapi
def maintainer_name(source_name):
    return emit(query("maintainer_name", source_name), True)
Example #9
0
File: pts.py Project: paultag/deapi
def priority(source_name):
    return emit(query("priority", source_name), True)
Example #10
0
File: pts.py Project: paultag/deapi
def section(source_name):
    return emit(query("section", source_name), True)
Example #11
0
File: pts.py Project: paultag/deapi
def standards_version(source_name):
    return emit(query("standards_version", source_name), True)
Example #12
0
File: pts.py Project: paultag/deapi
def uploaders(source_name):
    return emit(query("uploaders", source_name)._aslist(), True)
Example #13
0
File: pts.py Project: paultag/deapi
def maintainer_email(source_name):
    return emit(query("maintainer_email", source_name), True)
Example #14
0
def newest_bugs(amount):
	return emit(query("newest_bugs", amount)._aslist(), True)
Example #15
0
File: pts.py Project: paultag/deapi
def lintian(source_name):
    return emit(query("lintian", source_name), True)
Example #16
0
def get_versions(package, dist, arch):
	return emit(query("get_versions", {"package":package, "dist":dist, "arch":arch})._aslist(), True)
Example #17
0
File: pts.py Project: paultag/deapi
def latest_version(source_name):
    return emit(query("latest_version", source_name), True)