mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-29 16:09:10 +00:00
Fixed execution problem
Fixed an execution problem where the 2x executable path is not as the first argument resulting in an error.
This commit is contained in:
parent
7fd8228a1b
commit
1364ed507a
@ -61,18 +61,14 @@ class Waifu2xCaffe:
|
|||||||
# list to be executed
|
# list to be executed
|
||||||
execute = []
|
execute = []
|
||||||
|
|
||||||
|
execute.append(self.waifu2x_settings['waifu2x_caffe_path'])
|
||||||
for key in self.waifu2x_settings.keys():
|
for key in self.waifu2x_settings.keys():
|
||||||
|
|
||||||
value = self.waifu2x_settings[key]
|
value = self.waifu2x_settings[key]
|
||||||
|
|
||||||
# the key doesn't need to be passed in this case
|
#is executable key or null or None means that leave this option out (keep default)
|
||||||
if key == 'waifu2x_caffe_path':
|
if key == 'waifu2x_caffe_path' or value is None or value is False:
|
||||||
execute.append(str(value))
|
|
||||||
|
|
||||||
# null or None means that leave this option out (keep default)
|
|
||||||
elif value is None or value is False:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if len(key) == 1:
|
if len(key) == 1:
|
||||||
execute.append('-{}'.format(key))
|
execute.append('-{}'.format(key))
|
||||||
|
Loading…
Reference in New Issue
Block a user