mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* bitesize:
- display error message properly. - error out if bug is already marked as 'bitesize'. - rephrase bug comment and subscribe person who adds the comment. - work-around LP:336866 and LP:254901.
This commit is contained in:
parent
2d4683260b
commit
f8abc5b881
30
bitesize
30
bitesize
@ -34,6 +34,16 @@ def error_out(msg):
|
|||||||
Logger.error(msg)
|
Logger.error(msg)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def save_entry(entry):
|
||||||
|
try:
|
||||||
|
entry.lp_save()
|
||||||
|
except HTTPError, error:
|
||||||
|
print error.content
|
||||||
|
|
||||||
|
def tag_bug(bug):
|
||||||
|
bug.tags = bug.tags + ['bitesize'] # LP: #254901 workaround
|
||||||
|
save_entry(bug)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
usage = "Usage: %prog <bug number>"
|
usage = "Usage: %prog <bug number>"
|
||||||
opt_parser = OptionParser(usage)
|
opt_parser = OptionParser(usage)
|
||||||
@ -61,18 +71,18 @@ def main():
|
|||||||
bug = launchpad.bugs[args[0]]
|
bug = launchpad.bugs[args[0]]
|
||||||
except HTTPError, error:
|
except HTTPError, error:
|
||||||
if error.response.status == 401:
|
if error.response.status == 401:
|
||||||
error_out("E: Don't have enough permissions to access bug %s" % args[0])
|
error_out("E: Don't have enough permissions to access bug %s. %s" % \
|
||||||
error_out(error.content)
|
(args[0], error.content))
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
if 'bitesize' not in bug.tags:
|
if 'bitesize' in bug.tags:
|
||||||
bug.tags += ['bitesize']
|
error_out("Bug is already marked as 'bitesize'.")
|
||||||
content = """I'm marking this bug as 'bitesize' as it looks like an issue
|
bug.newMessage(content="I'm marking this bug as 'bitesize' as it looks "
|
||||||
that is easy to fix and suitable for newcomers in Ubuntu development. If you
|
"like an issue that is easy to fix and suitable "
|
||||||
need any help with fixing it, talk to me (https://launchpad.net/~%s) about
|
"for newcomers in Ubuntu development. If you need "
|
||||||
it.""" % (launchpad.me.name)
|
"any help with fixing it, talk to me about it.")
|
||||||
bug.newMessage(content=content, subject="bitesize bug")
|
bug.subscribe(person=launchpad.me)
|
||||||
bug.lp_save()
|
tag_bug(launchpad.bugs[bug.id]) # fresh bug object, LP: #336866 workaround
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -7,7 +7,14 @@ ubuntu-dev-tools (0.124) UNRELEASED; urgency=low
|
|||||||
[ Mackenzie Morgan ]
|
[ Mackenzie Morgan ]
|
||||||
* Add debhelper and quilt as recommends (LP: #786370)
|
* Add debhelper and quilt as recommends (LP: #786370)
|
||||||
|
|
||||||
-- Mackenzie Morgan <maco.m@ubuntu.com> Sat, 21 May 2011 19:29:35 -0400
|
[ Daniel Holbach ]
|
||||||
|
* bitesize:
|
||||||
|
- display error message properly.
|
||||||
|
- error out if bug is already marked as 'bitesize'.
|
||||||
|
- rephrase bug comment and subscribe person who adds the comment.
|
||||||
|
- work-around LP:336866 and LP:254901.
|
||||||
|
|
||||||
|
-- Daniel Holbach <daniel.holbach@ubuntu.com> Mon, 23 May 2011 15:47:04 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.123) unstable; urgency=low
|
ubuntu-dev-tools (0.123) unstable; urgency=low
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user