Commit 35ba0ec6 authored by segfault's avatar segfault
Browse files

unlock_veracrypt_volume: Check error domain + code instead of message

parent 56410251
......@@ -271,7 +271,7 @@ class Volume(object):
unmounted_at_least_once = True
except GLib.Error as e:
# Ignore "not mounted" error if the volume was already unmounted
if "org.freedesktop.UDisks2.Error.NotMounted" in e.message and unmounted_at_least_once:
if e.domain == "udisks-error-quark" and e.code == UDisks.Error.NOT_MOUNTED and unmounted_at_least_once:
return
raise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment