Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Flake8 errors

Peter van der Does200667e85c26
diff --git a/wger/exercises/management/commands/download-exercise-images.py b/wger/exercises/management/commands/download-exercise-images.py
index f76788bc9..472ba165e 100644
--- a/wger/exercises/management/commands/download-exercise-images.py
+++ b/wger/exercises/management/commands/download-exercise-images.py
@@ -66,12 +66,9 @@ class Command(BaseCommand):
except ValidationError:
raise CommandError('Please enter a valid URL')
-
exercise_api = "{0}/api/v2/exercise/?limit=999&status=2"
image_api = "{0}/api/v2/exerciseimage/?exercise={1}"
thumbnail_api = "{0}/api/v2/exerciseimage/{1}/thumbnails/"
-
-
headers = {'User-agent': default_user_agent('wger/{} + requests'.format(get_version()))}
@@ -89,10 +86,10 @@ class Command(BaseCommand):
try:
exercise = Exercise.objects.get(uuid=exercise_uuid)
-
+
except Exercise.DoesNotExist:
self.stdout.write(' Remote exercise not found in local DB, skipping...')
-
+
continue
# Get all images
@@ -135,4 +132,3 @@ class Command(BaseCommand):
else:
self.stdout.write(' No images for this exercise, nothing to do')
-
\ No newline at end of file