diff options
author | David H. Gutteridge <dhgutteridge@hotmail.com> | 2018-03-28 20:46:13 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2018-04-03 12:34:55 -0400 |
commit | 4a58a689db05e34af56cd96b7a6036cfeb2a9726 (patch) | |
tree | 6fbad3584adb04faa85879bb7018d97bcfe39e96 /virt-xml | |
parent | 45c7a0657feea2184843642f27bf521cf72a7c0d (diff) | |
download | virt-manager-4a58a689db05e34af56cd96b7a6036cfeb2a9726.tar.gz |
virt-xml: Warn when --update is inapplicable
Diffstat (limited to 'virt-xml')
-rwxr-xr-x | virt-xml | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -430,9 +430,13 @@ def main(conn=None): print_stdout(dev.get_xml_config()) return 0 - if options.update and active_xmlobj: - devs, action = prepare_changes(active_xmlobj, options, parserclass) - update_changes(domain, devs, action, options.confirm) + if options.update: + if active_xmlobj: + devs, action = prepare_changes(active_xmlobj, options, parserclass) + update_changes(domain, devs, action, options.confirm) + else: + logging.warning( + _("The VM is not running, --update is inapplicable.")) if options.define: devs, action = prepare_changes(inactive_xmlobj, options, parserclass) applied = define_changes(conn, inactive_xmlobj, |