From c1b86a232383748811c6faf17f364e63e10f7dd4 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 14 Nov 2012 11:36:51 +0900 Subject: Fix inconsistent indentation The repo coding style is to indent at 2 characters, but there are many places where this is not followed. Enable pylint warning "W0311: Bad indentation" and make sure all indentation is at multiples of 2 characters. Change-Id: I68f0f64470789ce2429ab11104d15d380a63e6a8 --- subcmds/upload.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'subcmds/upload.py') diff --git a/subcmds/upload.py b/subcmds/upload.py index a6ada337..219c5093 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -312,23 +312,23 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ # Check if there are local changes that may have been forgotten if branch.project.HasChanges(): - key = 'review.%s.autoupload' % branch.project.remote.review - answer = branch.project.config.GetBoolean(key) - - # if they want to auto upload, let's not ask because it could be automated - if answer is None: - sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ') - a = sys.stdin.readline().strip().lower() - if a not in ('y', 'yes', 't', 'true', 'on'): - print("skipping upload", file=sys.stderr) - branch.uploaded = False - branch.error = 'User aborted' - continue + key = 'review.%s.autoupload' % branch.project.remote.review + answer = branch.project.config.GetBoolean(key) + + # if they want to auto upload, let's not ask because it could be automated + if answer is None: + sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ') + a = sys.stdin.readline().strip().lower() + if a not in ('y', 'yes', 't', 'true', 'on'): + print("skipping upload", file=sys.stderr) + branch.uploaded = False + branch.error = 'User aborted' + continue # Check if topic branches should be sent to the server during upload if opt.auto_topic is not True: - key = 'review.%s.uploadtopic' % branch.project.remote.review - opt.auto_topic = branch.project.config.GetBoolean(key) + key = 'review.%s.uploadtopic' % branch.project.remote.review + opt.auto_topic = branch.project.config.GetBoolean(key) branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) branch.uploaded = True @@ -355,11 +355,11 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ print() for branch in todo: - if branch.uploaded: - print('[OK ] %-15s %s' % ( - branch.project.relpath + '/', - branch.name), - file=sys.stderr) + if branch.uploaded: + print('[OK ] %-15s %s' % ( + branch.project.relpath + '/', + branch.name), + file=sys.stderr) if have_errors: sys.exit(1) -- cgit v1.2.3-54-g00ecf