From 6e6f88c336512f468d2512e692a03ddb41bb54ce Mon Sep 17 00:00:00 2001 From: zserg Date: Wed, 27 Jan 2016 15:54:56 +0300 Subject: [PATCH] some fixes in subprocess.Popen args for windows/linux support --- elodie/media/media.py | 2 +- elodie/media/video.py | 2 +- elodie/tests/filesystem_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elodie/media/media.py b/elodie/media/media.py index d60b82d..31e2a0d 100644 --- a/elodie/media/media.py +++ b/elodie/media/media.py @@ -106,7 +106,7 @@ class Media(object): source = self.source process_output = subprocess.Popen( - [exiftool, source], + '%s "%s"' % (exiftool, source), stdout=subprocess.PIPE, shell=True, universal_newlines=True diff --git a/elodie/media/video.py b/elodie/media/video.py index d06c03f..3ea78fc 100644 --- a/elodie/media/video.py +++ b/elodie/media/video.py @@ -156,7 +156,7 @@ class Video(Media): source = self.source process_output = subprocess.Popen( - [exiftool, source], + '%s "%s"' % (exiftool, source), stdout=subprocess.PIPE, shell=True, universal_newlines=True diff --git a/elodie/tests/filesystem_test.py b/elodie/tests/filesystem_test.py index 0823fbc..bfe05b1 100644 --- a/elodie/tests/filesystem_test.py +++ b/elodie/tests/filesystem_test.py @@ -50,7 +50,7 @@ def test_create_directory_invalid_permissions(): if os.name == 'nt': raise SkipTest("It isn't implemented on Windows") filesystem = FileSystem() - status = filesystem.create_directory(os.path.join('apathwhichdoesnotexist','afolderwhichdoesnotexist')) + status = filesystem.create_directory('/apathwhichdoesnotexist/afolderwhichdoesnotexist') assert status == False