Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def increase_pr(increment):
- pr = d.getVar('PR', True)
- pr_prefix = re.search("\D+",pr)
- prval = re.search("\d+",pr)
- if pr_prefix is None or prval is None:
- bb.error("Unable to analyse format of PR variable: %s" % pr)
- nval = int(prval.group(0)) + int(increment)
- pr = pr_prefix.group(0) + str(nval) + pr[prval.end():]
- return pr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement