From bcca56e0c64e847e22a70c12fbe96db196f481d6 Mon Sep 17 00:00:00 2001 From: Martin Miglio Date: Fri, 8 May 2026 17:18:38 -0400 Subject: [PATCH] Fix set_configuration_vm for multi-value configs memuc_run uses subprocess with shell=False, so a space-separated value like "270 480 120" was passed as a single argv slot and rejected with 'invalid config parameter'. Split on whitespace so configs that take multiple tokens (e.g. custom_resolution, geometry) are forwarded as separate args, matching the memuc CLI's expectations. Closes #192 --- pymemuc/_manage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pymemuc/_manage.py b/pymemuc/_manage.py index 96b3550..a76922b 100644 --- a/pymemuc/_manage.py +++ b/pymemuc/_manage.py @@ -370,10 +370,11 @@ def set_configuration_vm( :return: True if the vm configuration was set successfully :rtype: Literal[True] """ + config_values = config_value.split() if vm_index is not None: - status, output = self.memuc_run(["-i", str(vm_index), "setconfigex", config_key, config_value]) + status, output = self.memuc_run(["-i", str(vm_index), "setconfigex", config_key, *config_values]) elif vm_name is not None: - status, output = self.memuc_run(["-n", vm_name, "setconfigex", config_key, config_value]) + status, output = self.memuc_run(["-n", vm_name, "setconfigex", config_key, *config_values]) else: msg = "Please specify either a vm index or a vm name" raise PyMemucIndexError(msg)