def add_group(): name = request.json['group_name'] host = request.json['group_host'] new_group = group(name,host) db.session.add(new_group) db.session.commit() return jsonify(new_group)
def ExtractBuildUsername(pkginfo): m = re.match(common_constants.PSTAMP_RE, pkginfo["PSTAMP"]) return m.group("username") if m else None
def ExtractMaintainerName(pkginfo): maint_re = re.compile("^.*for CSW by (.*)$") m = re.match(maint_re, pkginfo["VENDOR"]) return m.group(1) if m else None
def ExtractDescription(pkginfo): desc_re = re.compile(DESCRIPTION_RE) m = re.match(desc_re, pkginfo["NAME"]) return m.group(2) if m else None