From 4fd38c8f1b8de0cf4da414fa11acab9ed04f52e2 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 16 Aug 2016 17:57:30 +0100 Subject: [PATCH] trivial: Only show the device error when no devices are due to be updated Showing a 'no attached hardware matched' then a large list of GUIDs isn't super helpful. --- src/fu-main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fu-main.c b/src/fu-main.c index 88e4ac0ee..bdb4a2039 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -883,15 +883,14 @@ fu_main_update_helper (FuMainAuthHelper *helper, GError **error) g_ptr_array_add (helper->devices, g_object_ref (item->device)); } if (helper->devices->len == 0) { - g_autofree gchar *guid = NULL; - guid = fu_main_get_guids_from_store (helper->store); if (error_first != NULL) { - g_set_error (error, - FWUPD_ERROR, - FWUPD_ERROR_INVALID_FILE, - "no attached hardware matched %s: %s", - guid, error_first->message); + g_set_error_literal (error, + FWUPD_ERROR, + FWUPD_ERROR_INVALID_FILE, + error_first->message); } else { + g_autofree gchar *guid = NULL; + guid = fu_main_get_guids_from_store (helper->store); g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_INVALID_FILE,