From 7fb0a5bb55473adb26502725df8ee989d0894592 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 25 Apr 2018 12:03:15 +0200 Subject: [PATCH] Set download_dir only if specified --- platypush/plugins/video/omxplayer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/video/omxplayer.py b/platypush/plugins/video/omxplayer.py index baecf89da..ffa1ec34b 100644 --- a/platypush/plugins/video/omxplayer.py +++ b/platypush/plugins/video/omxplayer.py @@ -33,7 +33,6 @@ class VideoOmxplayerPlugin(Plugin): super().__init__(*argv, **kwargs) self.args = args - self.download_dir = os.path.abspath(os.path.expanduser(download_dir)) self.media_dirs = set( filter( lambda _: os.path.isdir(_), @@ -44,7 +43,8 @@ class VideoOmxplayerPlugin(Plugin): ) ) - if self.download_dir: + if download_dir: + self.download_dir = os.path.abspath(os.path.expanduser(download_dir)) if not os.path.isdir(self.download_dir): raise RuntimeError('download_dir [{}] is not a valid directory' .format(self.download_dir))