]> git.ozlabs.org Git - patchwork/commitdiff
Replace tab in indentation with space
authorDirk Wallenstein <halsmit@t-online.de>
Wed, 12 Jan 2011 23:05:08 +0000 (23:05 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 11 Feb 2011 00:52:19 +0000 (08:52 +0800)
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/forms.py
apps/patchwork/tests/encodings.py
apps/patchwork/tests/utils.py
apps/patchwork/views/bundle.py
apps/patchwork/views/xmlrpc.py

index 1c5aeef5394dd4e62de228229eb404de4ce0af31..4c811f547c439dd924db58bb5c8a496b497e78e5 100644 (file)
@@ -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
 
index 397b39ba877887f26eb4d4188deb91e5cf4d2069..db9848380076e4ead70d7db74c083ca1ac17099d 100644 (file)
@@ -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,
index cf445aa27105ce073611eeff0c5e6ee0d5f8e146..02c4bd498b2a3ae0555f498e9a02e85a8e547f71 100644 (file)
@@ -40,7 +40,7 @@ class defaults(object):
 
     patch_author = 'Patch Author <patch-author@example.com>'
     patch_author_person = Person(name = 'Patch Author',
-                                email = 'patch-author@example.com')
+            email = 'patch-author@example.com')
 
     comment_author = 'Comment Author <comment-author@example.com>'
 
@@ -92,7 +92,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)
 
index 18beb08fa00f19f3bcdef4536af1fdc24377659b..62b50d4989314fc504431e40407ba5ba26da4d0d 100644 (file)
@@ -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
 
index 0d3321fc259d5e431cfc643d7fbd48d850ecf890..3310e69651ae5c52347e5e6af479b9dfd062865f 100644 (file)
@@ -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()