From 1364ed507a25532379044dcb6589bd6d1230b40e Mon Sep 17 00:00:00 2001 From: BrianPetkovsek <16124109+BrianPetkovsek@users.noreply.github.com> Date: Sun, 24 Mar 2019 05:25:21 -0400 Subject: [PATCH] Fixed execution problem Fixed an execution problem where the 2x executable path is not as the first argument resulting in an error. --- bin/waifu2x_caffe.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/waifu2x_caffe.py b/bin/waifu2x_caffe.py index e20274b..8403c02 100644 --- a/bin/waifu2x_caffe.py +++ b/bin/waifu2x_caffe.py @@ -61,18 +61,14 @@ class Waifu2xCaffe: # list to be executed execute = [] + execute.append(self.waifu2x_settings['waifu2x_caffe_path']) for key in self.waifu2x_settings.keys(): value = self.waifu2x_settings[key] - # the key doesn't need to be passed in this case - if key == 'waifu2x_caffe_path': - execute.append(str(value)) - - # null or None means that leave this option out (keep default) - elif value is None or value is False: + #is executable key or null or None means that leave this option out (keep default) + if key == 'waifu2x_caffe_path' or value is None or value is False: continue - else: if len(key) == 1: execute.append('-{}'.format(key))