summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-app.c
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2016-02-14 19:27:59 +0100
committerPavel Grunt <pgrunt@redhat.com>2016-02-15 10:04:42 +0100
commit8c9a968561f875e4d00e7d5f9dc09dfddd7b89eb (patch)
tree6a6beeb062231224e386f6346c4c39c0448cdf06 /src/virt-viewer-app.c
parentfcb200e3d4452ebf53d2205603ac18305104806b (diff)
downloadvirt-viewer-8c9a968561f875e4d00e7d5f9dc09dfddd7b89eb.tar.gz
virt-viewer-8c9a968561f875e4d00e7d5f9dc09dfddd7b89eb.tar.xz
virt-viewer-8c9a968561f875e4d00e7d5f9dc09dfddd7b89eb.zip
app: Add comment only when config file has VM group
Avoid the debug message on close: virt-viewer-DEBUG: Unable to get comment from key file: Key file does not have group '39cd210d-5d45-478a-91fe-b3680307f2df'
Diffstat (limited to 'src/virt-viewer-app.c')
-rw-r--r--src/virt-viewer-app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index d4ce06a..42c2ac8 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -259,7 +259,7 @@ virt_viewer_app_save_config(VirtViewerApp *self)
g_warning("failed to create config directory");
g_free(dir);
- if (priv->uuid && priv->guest_name) {
+ if (priv->uuid && priv->guest_name && g_key_file_has_group(priv->config, priv->uuid)) {
// if there's no comment for this uuid settings group, add a comment
// with the vm name so user can make sense of it later.
gchar *comment = g_key_file_get_comment(priv->config, priv->uuid, NULL, &error);