summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-21 12:13:49 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-21 12:13:49 +0200
commit29b0eb5b83c004046b9be7f21211ab6652f38424 (patch)
treeb29bd4e227da19209461a71ad32694a8f02c1424
parent88b2851c88ab26ad8aca4e0834f9c23ab720ee4b (diff)
vars..
-rw-r--r--live-mogrify.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/live-mogrify.py b/live-mogrify.py
index d781721..b77f36d 100644
--- a/live-mogrify.py
+++ b/live-mogrify.py
@@ -134,8 +134,8 @@ class Listener():
def _set_fn(self, key, value):
if hasattr(self.data_opt, key):
try:
- new_opt = self.data_opt_parser.parse_known_args([ key.replace('_', '-'), value ])
- new_value = getattr(new_opt, key)
+ new_opt = self.data_opt_parser.parse_known_args([ '--' + key.replace('_', '-'), value ])
+ new_value = vars(new_opt)[key]
print('set {} {}: {}'.format(type(value), key, new_value))
setattr(self.data_opt, key, new_value)
except Exception as e: