From f2ff378a9d1341438eb0c67095a3e2c5e7fc254e Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 20 Sep 2014 16:18:10 -0400 Subject: [PATCH] details: Avoid some misleading logging on rename --- virtManager/details.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/virtManager/details.py b/virtManager/details.py index 2a9b3dad8..ee096e7b6 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -1910,10 +1910,6 @@ class vmmDetails(vmmGObjectUI): kwargs = {} hotplug_args = {} - if self.edited(EDIT_NAME): - # Renaming is pretty convoluted, so do it here synchronously - self.vm.define_name(self.widget("overview-name").get_text()) - if self.edited(EDIT_TITLE): kwargs["title"] = self.widget("overview-title").get_text() hotplug_args["title"] = kwargs["title"] @@ -1949,6 +1945,15 @@ class vmmDetails(vmmGObjectUI): idmap_list = None kwargs["idmap_list"] = idmap_list + # This needs to be last + if self.edited(EDIT_NAME): + # Renaming is pretty convoluted, so do it here synchronously + self.vm.define_name(self.widget("overview-name").get_text()) + + if not kwargs and not hotplug_args: + # Saves some useless redefine attempts + return + return vmmAddHardware.change_config_helper(self.vm.define_overview, kwargs, self.vm, self.err, hotplug_args=hotplug_args)