From 5401bffe4565bbe6e9c1f09cb2fc5619fdb8b877 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 9 Feb 2008 04:03:38 +0100 Subject: [PATCH] requestsync: Fix indentation --- requestsync | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/requestsync b/requestsync index 227df74..be4a7ec 100755 --- a/requestsync +++ b/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 |--lp] [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)