mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-19 06:11:09 +00:00
requestsync: Fix indentation
This commit is contained in:
parent
f99fc1109c
commit
5401bffe45
20
requestsync
20
requestsync
@ -19,11 +19,11 @@ def cur_version_component(sourcepkg, release):
|
||||
assert (madison.returncode == 0)
|
||||
|
||||
for l in out.splitlines():
|
||||
(pkg, version, rel, builds) = l.split('|')
|
||||
component = 'main'
|
||||
if rel.find('/') != -1:
|
||||
component = rel.split('/')[1]
|
||||
return (version.strip(), component.strip())
|
||||
(pkg, version, rel, builds) = l.split('|')
|
||||
component = 'main'
|
||||
if rel.find('/') != -1:
|
||||
component = rel.split('/')[1]
|
||||
return (version.strip(), component.strip())
|
||||
|
||||
print "%s doesn't appear to exist in %s, specify -n for a package not in Ubuntu." % (sourcepkg, release)
|
||||
sys.exit(1)
|
||||
@ -89,7 +89,7 @@ def wait_for_enter_or_exit():
|
||||
raw_input()
|
||||
except KeyboardInterrupt:
|
||||
print 'Abort requested. No sync request filed.'
|
||||
sys.exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
def usage():
|
||||
print '''Usage: requestsync [-h|-n|-s|-k <keyid>|--lp] <source package> <target release> [basever]
|
||||
@ -171,7 +171,7 @@ def mail_bug(source_package, subscribe, status, bugtitle, bugtext, keyid = None)
|
||||
mailserver_pass = os.getenv('DEBSMTP_PASS')
|
||||
if mailserver_user and mailserver_pass:
|
||||
try:
|
||||
s.login(mailserver_user, mailserver_pass)
|
||||
s.login(mailserver_user, mailserver_pass)
|
||||
except smtplib.SMTPAuthenticationError:
|
||||
print 'Error authenticating to the server: invalid username and password.'
|
||||
s.quit()
|
||||
@ -211,7 +211,7 @@ def post_bug(source_package, subscribe, status, bugtitle, bugtext):
|
||||
product = {'name': source_package, 'target': 'ubuntu'}
|
||||
else:
|
||||
# new source package
|
||||
product = {'name': 'ubuntu'}
|
||||
product = {'name': 'ubuntu'}
|
||||
|
||||
print 'Summary:\n%s\n\nDescription:\n%s' % (bugtitle, bugtext)
|
||||
|
||||
@ -346,12 +346,12 @@ if __name__ == '__main__':
|
||||
srcpkg = not newsource and srcpkg or None
|
||||
if use_lp_bugs:
|
||||
# Map status to the values expected by lp-bugs
|
||||
mapping = {'new': 'New', 'confirmed': 'Confirmed'}
|
||||
mapping = {'new': 'New', 'confirmed': 'Confirmed'}
|
||||
if post_bug(srcpkg, subscribe, mapping[status], title, report):
|
||||
sys.exit(0)
|
||||
|
||||
if mail_bug(srcpkg, subscribe, status, title, report, keyid):
|
||||
sys.exit(0)
|
||||
sys.exit(0)
|
||||
|
||||
print 'Something went wrong. No sync request filed.'
|
||||
sys.exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user