From patchwork Thu Jan 13 09:05:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Wallenstein X-Patchwork-Id: 78696 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 578D2B71F7 for ; Thu, 13 Jan 2011 20:05:34 +1100 (EST) Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) by ozlabs.org (Postfix) with ESMTP id 8E037B70EA for ; Thu, 13 Jan 2011 20:05:30 +1100 (EST) Received: from fwd08.aul.t-online.de (fwd08.aul.t-online.de ) by mailout02.t-online.de with smtp id 1PdJ7Y-0001h4-8g; Thu, 13 Jan 2011 10:05:28 +0100 Received: from localhost.localdomain (rfhe1wZSwhI3tvroS97WwqEQVm4qOiTE-88oR3JIJPfIWdgWmwYjU2xI1JHxsq6wQu@[84.139.36.93]) by fwd08.t-online.de with esmtp id 1PdJ7M-1cGFbK0; Thu, 13 Jan 2011 10:05:16 +0100 From: Dirk Wallenstein To: patchwork@lists.ozlabs.org Subject: [PATCH 3/4] Replace tab in indentation with space Date: Thu, 13 Jan 2011 10:05:08 +0100 Message-Id: <1294909509-20746-4-git-send-email-halsmit@t-online.de> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1294909509-20746-1-git-send-email-halsmit@t-online.de> References: <1294909509-20746-1-git-send-email-halsmit@t-online.de> X-ID: rfhe1wZSwhI3tvroS97WwqEQVm4qOiTE-88oR3JIJPfIWdgWmwYjU2xI1JHxsq6wQu X-TOI-MSGID: 52b23e85-555a-4cb8-b8e8-d014ec5fedb6 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: , MIME-Version: 1.0 Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Signed-off-by: Dirk Wallenstein --- apps/patchwork/forms.py | 6 +++--- apps/patchwork/tests/encodings.py | 6 +++--- apps/patchwork/tests/utils.py | 4 ++-- apps/patchwork/views/bundle.py | 16 ++++++++-------- apps/patchwork/views/xmlrpc.py | 8 ++++---- 5 files changed, 20 insertions(+), 20 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..db98483 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..5fd2dae 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 18beb08..62b50d4 100644 --- a/apps/patchwork/views/bundle.py +++ b/apps/patchwork/views/bundle.py @@ -110,17 +110,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 @@ -174,7 +174,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 0d3321f..3310e69 100644 --- a/apps/patchwork/views/xmlrpc.py +++ b/apps/patchwork/views/xmlrpc.py @@ -59,14 +59,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()