From patchwork Tue Feb 22 14:05:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 83969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 2689EB71A3 for ; Wed, 23 Feb 2011 01:05:14 +1100 (EST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by ozlabs.org (Postfix) with ESMTP id 6EB5DB719E for ; Wed, 23 Feb 2011 01:05:13 +1100 (EST) Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PrsrY-0004rW-B0; Tue, 22 Feb 2011 14:05:12 +0000 Received: from [187.126.171.60] (helo=feioso) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PrsrX-000244-Li; Tue, 22 Feb 2011 14:05:12 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by feioso (Postfix) with ESMTP id 612A9485CE; Tue, 22 Feb 2011 11:05:08 -0300 (BRT) Subject: [PATCH] Replace tab characters with spaces on .py files. To: patchwork@lists.ozlabs.org From: Guilherme Salgado Date: Tue, 22 Feb 2011 11:05:08 -0300 Message-ID: <20110222140508.357.1147.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: patches@linaro.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org --- apps/patchwork/views/bundle.py | 16 ++++++++-------- apps/patchwork/views/xmlrpc.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/patchwork/forms.py b/apps/patchwork/forms.py index 1c5aeef..4c811f5 100644 --- a/apps/patchwork/forms.py +++ b/apps/patchwork/forms.py @@ -45,9 +45,9 @@ class RegistrationForm(RegistrationFormUniqueEmail): user.last_name = self.cleaned_data.get('last_name', '') user.save() - # saving the userprofile causes the firstname/lastname to propagate - # to the person objects. - user.get_profile().save() + # saving the userprofile causes the firstname/lastname to propagate + # to the person objects. + user.get_profile().save() return user diff --git a/apps/patchwork/tests/encodings.py b/apps/patchwork/tests/encodings.py index 397b39b..b9032bb 100644 --- a/apps/patchwork/tests/encodings.py +++ b/apps/patchwork/tests/encodings.py @@ -69,9 +69,9 @@ class UTF8HeaderPatchViewTest(UTF8PatchViewTest): def setUp(self): defaults.project.save() - self.patch_author = Person(name = self.patch_author_name, - email = defaults.patch_author_person.email) - self.patch_author.save() + self.patch_author = Person(name = self.patch_author_name, + email = defaults.patch_author_person.email) + self.patch_author.save() self.patch_content = read_patch(self.patch_filename, encoding = self.patch_encoding) self.patch = Patch(project = defaults.project, diff --git a/apps/patchwork/tests/utils.py b/apps/patchwork/tests/utils.py index a85e168..0c81824 100644 --- a/apps/patchwork/tests/utils.py +++ b/apps/patchwork/tests/utils.py @@ -40,7 +40,7 @@ class defaults(object): patch_author = 'Patch Author ' patch_author_person = Person(name = 'Patch Author', - email = 'patch-author@example.com') + email = 'patch-author@example.com') comment_author = 'Comment Author ' @@ -86,7 +86,7 @@ def find_in_context(context, key): def read_patch(filename, encoding = None): file_path = os.path.join(_test_patch_dir, filename) if encoding is not None: - f = codecs.open(file_path, encoding = encoding) + f = codecs.open(file_path, encoding = encoding) else: f = file(file_path) diff --git a/apps/patchwork/views/bundle.py b/apps/patchwork/views/bundle.py index fffa9ca..687c53d 100644 --- a/apps/patchwork/views/bundle.py +++ b/apps/patchwork/views/bundle.py @@ -109,17 +109,17 @@ def bundles(request): if request.method == 'POST': form_name = request.POST.get('form_name', '') - if form_name == DeleteBundleForm.name: - form = DeleteBundleForm(request.POST) - if form.is_valid(): - bundle = get_object_or_404(Bundle, - id = form.cleaned_data['bundle_id']) - bundle.delete() + if form_name == DeleteBundleForm.name: + form = DeleteBundleForm(request.POST) + if form.is_valid(): + bundle = get_object_or_404(Bundle, + id = form.cleaned_data['bundle_id']) + bundle.delete() bundles = Bundle.objects.filter(owner = request.user) for bundle in bundles: bundle.delete_form = DeleteBundleForm(auto_id = False, - initial = {'bundle_id': bundle.id}) + initial = {'bundle_id': bundle.id}) context['bundles'] = bundles @@ -173,7 +173,7 @@ def mbox(request, bundle_id): bundle = get_object_or_404(Bundle, id = bundle_id) response = HttpResponse(mimetype='text/plain') response['Content-Disposition'] = 'attachment; filename=bundle-%d.mbox' % \ - bundle.id + bundle.id response.write(bundle.mbox()) return response diff --git a/apps/patchwork/views/xmlrpc.py b/apps/patchwork/views/xmlrpc.py index 37b8eb4..1d9d389 100644 --- a/apps/patchwork/views/xmlrpc.py +++ b/apps/patchwork/views/xmlrpc.py @@ -56,14 +56,14 @@ class PatchworkXMLRPCDispatcher(SimpleXMLRPCDispatcher): def _user_for_request(self, request): - auth_header = None + auth_header = None if request.META.has_key('HTTP_AUTHORIZATION'): - auth_header = request.META.get('HTTP_AUTHORIZATION') + auth_header = request.META.get('HTTP_AUTHORIZATION') elif request.META.has_key('Authorization'): - auth_header = request.META.get('Authorization') + auth_header = request.META.get('Authorization') - if auth_header is None or auth_header == '': + if auth_header is None or auth_header == '': raise Exception("No authentication credentials given") str = auth_header.strip()