From 482f3d4de49dfe8a4739266774e091474e942bb1 Mon Sep 17 00:00:00 2001 From: Jaisen Mathai Date: Mon, 14 Mar 2016 21:54:06 -0700 Subject: [PATCH] Fix syntax errors reported by flake8 --- .pre-commit | 2 +- elodie/media/video.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit b/.pre-commit index 5222b6a..76f60de 100755 --- a/.pre-commit +++ b/.pre-commit @@ -1,3 +1,3 @@ #!/usr/bin/env bash -nosetests -w elodie/tests && flake8 elodie --exclude=tests +flake8 elodie --exclude=tests && nosetests -w elodie/tests diff --git a/elodie/media/video.py b/elodie/media/video.py index 6afc285..4a08ec1 100644 --- a/elodie/media/video.py +++ b/elodie/media/video.py @@ -393,12 +393,13 @@ class Video(Media): if(constants.debug is True): print 'Something went wrong updating video metadata' return False - + # gh-89 Before we wrap up we check if an album was previously set - # and if so we re-apply that album because avmetareadwrite clobbers it + # and if so we re-apply that album because avmetareadwrite + # clobbers it source_media = Media.get_class_by_file(source, [self.__class__]) source_metadata = source_media.get_metadata() - if('album' in source_metadata and source_metadata['album'] is not None): + if(source_metadata['album'] is not None): check_media.set_album(source_metadata['album']) # Copy file information from original source to temporary file