From 7a82ec74f0945df1cebebf9497338bb5a079c68f Mon Sep 17 00:00:00 2001 From: Stefan Koegl Date: Tue, 28 Sep 2010 16:59:49 +0300 Subject: [PATCH] fix various typos --- mygpo/api/advanced/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mygpo/api/advanced/__init__.py b/mygpo/api/advanced/__init__.py index 6bb5e216..d8037dea 100644 --- a/mygpo/api/advanced/__init__.py +++ b/mygpo/api/advanced/__init__.py @@ -101,7 +101,7 @@ def update_subscriptions(user, device, add, remove): if us != '': add_sanitized.append(us) for u in remove: - us = sanitize_append(u, updated_urls)) + us = sanitize_append(u, updated_urls) if us != '' and us not in add_sanitized: rem_sanitized.append(us) @@ -124,7 +124,7 @@ def update_subscriptions(user, device, add, remove): def get_subscription_changes(user, device, since, until): #ordered by ascending date; newer entries overwriter older ones query = SubscriptionAction.objects.filter(device=device, - timestamp__gt=since, timestamp__lte=until).order_by('timestamp'): + timestamp__gt=since, timestamp__lte=until).order_by('timestamp') actions = dict([(a.podcast, a) for a in query]) add = filter(lambda a: a.action == SUBSCRIBE_ACTION, actions) @@ -317,7 +317,7 @@ def device_data(device): caption = device.name, type = device.type, subscription = Subscription.objects.filter(device=device).count() - } + ) @csrf_exempt @@ -381,7 +381,7 @@ def sanitize_append(url, sanitized_list): return urls -def check_time_values(action) +def check_time_values(action): PLAY_ACTION_KEYS = ('position', 'started', 'total') # Key found, but must not be supplied (no play action!) @@ -390,7 +390,7 @@ def check_time_values(action) if key in e: raise ValueError('%s only allowed in play actions' % key) - supplied_keys = filter(lambda: x: x in e, PLAY_ACTION_KEYS) + supplied_keys = filter(lambda x: x in e, PLAY_ACTION_KEYS) time_values = map(lambda x: parse_time(e[x]), supplied_keys) # Sanity check: If started or total are given, require position -- 2.11.4.GIT