mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 15:33:12 +00:00
trivial: Do not log a scary warning for the common case
This commit is contained in:
parent
3b919fc38d
commit
4daaabe451
@ -203,9 +203,11 @@ fu_device_locker_new_full (gpointer device,
|
|||||||
if (!self->open_func (device, error)) {
|
if (!self->open_func (device, error)) {
|
||||||
g_autoptr(GError) error_local = NULL;
|
g_autoptr(GError) error_local = NULL;
|
||||||
if (!self->close_func (device, &error_local)) {
|
if (!self->close_func (device, &error_local)) {
|
||||||
|
if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO)) {
|
||||||
g_debug("ignoring close error on aborted open: %s",
|
g_debug("ignoring close error on aborted open: %s",
|
||||||
error_local->message);
|
error_local->message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ fu_device_open_refcount_func (void)
|
|||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert_true (ret);
|
g_assert_true (ret);
|
||||||
ret = fu_device_close (device, &error);
|
ret = fu_device_close (device, &error);
|
||||||
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_INTERNAL);
|
g_assert_error(error, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO);
|
||||||
g_assert_false (ret);
|
g_assert_false (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user