Permalink
Browse files

PEP8ify

  • Loading branch information...
1 parent dafdc30 commit 501d32361dbdd0d05649dc0bb54babfe445bb1da @ask ask committed Feb 1, 2012
Showing with 6 additions and 5 deletions.
  1. +5 −3 djcelery/tests/test_schedulers.py
  2. +1 −1 djcelery/utils.py
  3. +0 −1 djcelery/views.py
@@ -11,7 +11,7 @@
from djcelery.app import app
from djcelery.models import PeriodicTask, IntervalSchedule, CrontabSchedule
from djcelery.models import PeriodicTasks
-from djcelery.utils import now, make_aware
+from djcelery.utils import now
from djcelery.tests.utils import unittest
@@ -237,7 +237,8 @@ def test_PeriodicTask_unicode_interval(self):
"%s: every 10.0 seconds" % p.name)
def test_PeriodicTask_unicode_crontab(self):
- p = create_model_crontab(crontab(hour="4, 5", day_of_week="4, 5", nowfun=now))
+ p = create_model_crontab(crontab(hour="4, 5", day_of_week="4, 5",
+ nowfun=now))
self.assertEqual(unicode(p),
"%s: * 4,5 4,5 (m/h/d)" % p.name)
@@ -246,7 +247,8 @@ def test_PeriodicTask_schedule_property(self):
s1 = p1.schedule
self.assertEqual(timedelta_seconds(s1.run_every), 10)
- p2 = create_model_crontab(crontab(hour="4, 5", minute="10,20,30", nowfun=now))
+ p2 = create_model_crontab(crontab(hour="4, 5", minute="10,20,30",
+ nowfun=now))
s2 = p2.schedule
self.assertSetEqual(s2.hour, set([4, 5]))
self.assertSetEqual(s2.minute, set([10, 20, 30]))
View
@@ -6,7 +6,7 @@
from django.utils.translation import ungettext, ugettext as _
# Database-related exceptions.
-from django.db.utils import DatabaseError, IntegrityError
+from django.db.utils import DatabaseError
try:
import MySQLdb as mysql
_my_database_errors = (mysql.DatabaseError, )
View
@@ -31,7 +31,6 @@ def task_view(task):
"""
def _applier(request, **options):
- from celery import current_app
kwargs = kwdict(request.method == "POST" and \
request.POST or request.GET)
kwargs = dict((k, v[0])

0 comments on commit 501d323

Please sign in to comment.