fix dbus exception problem

This commit is contained in:
Safa Arıman
2019-08-08 23:10:54 +03:00
parent c8c768f5ed
commit bec44c3fa0
+3 -2
View File
@@ -36,8 +36,9 @@ def is_char_valid(char):
def is_method_missing(exception):
"""Tells if exception is about missing method in COMAR script"""
if exception._dbus_error_name in ("tr.org.pardus.comar.python.missing",
"tr.org.pardus.comar.Missing"):
if exception.get_dbus_name() in ("tr.org.pardus.comar.python.missing", "tr.org.pardus.comar.Missing"):
return True
if exception.__context__.get_dbus_name() in ("tr.org.pardus.comar.python.missing", "tr.org.pardus.comar.Missing"):
return True
return False