mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-07-28 15:21:28 +00:00
devscripts.logger
This commit is contained in:
parent
840421c7c6
commit
84e7c2ccab
@ -18,6 +18,7 @@ from collections import defaultdict
|
|||||||
import optparse
|
import optparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from devscripts.logger import Logger
|
||||||
from distro_info import UbuntuDistroInfo
|
from distro_info import UbuntuDistroInfo
|
||||||
|
|
||||||
from ubuntutools.lp.lpapicache import Launchpad, Distribution
|
from ubuntutools.lp.lpapicache import Launchpad, Distribution
|
||||||
@ -105,7 +106,7 @@ def main():
|
|||||||
destinations = determine_destinations(options.source,
|
destinations = determine_destinations(options.source,
|
||||||
options.destination)
|
options.destination)
|
||||||
except DestinationException, e:
|
except DestinationException, e:
|
||||||
print str(e)
|
Logger.error(str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
request_backport(package, options.source, destinations)
|
request_backport(package, options.source, destinations)
|
||||||
@ -153,7 +154,7 @@ def request_backport(package, source, destinations):
|
|||||||
try:
|
try:
|
||||||
package_spph = archive.getSourcePackage(package, source)
|
package_spph = archive.getSourcePackage(package, source)
|
||||||
except PackageNotFoundException, e:
|
except PackageNotFoundException, e:
|
||||||
print str(e)
|
Logger.error(str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
subst = {
|
subst = {
|
||||||
@ -188,8 +189,8 @@ def request_backport(package, source, destinations):
|
|||||||
|
|
||||||
subject, body = edit_report(subject, body, changes_required=True)
|
subject, body = edit_report(subject, body, changes_required=True)
|
||||||
|
|
||||||
print ('The final report is:\nSummary: %s\nDescription:\n%s\n'
|
Logger.normal('The final report is:\nSummary: %s\nDescription:\n%s\n',
|
||||||
% (subject, body))
|
subject, body)
|
||||||
if YesNoQuestion().ask("Request this backport", "yes") == "no":
|
if YesNoQuestion().ask("Request this backport", "yes") == "no":
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@ -200,7 +201,7 @@ def request_backport(package, source, destinations):
|
|||||||
for target in targets[1:]:
|
for target in targets[1:]:
|
||||||
bug.addTask(target=target)
|
bug.addTask(target=target)
|
||||||
|
|
||||||
print "Backport request filed as %s" % bug.web_link
|
Logger.normal("Backport request filed as %s", bug.web_link)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user