Skip to content
Snippets Groups Projects
Commit 7d357dfe authored by nkour's avatar nkour
Browse files

fix names of exception, fix docstring, fix strings

parent 9cf5a806
No related branches found
No related tags found
No related merge requests found
......@@ -44,25 +44,25 @@ def send_error(error_message):
sys.exit(1)
class ServiceNotAvailable(Exception):
''' This exception indicates that there is no session daemon '''
'''This exception is raised when we cannot use Gajim remotely'''
def __init__(self):
Exception.__init__(self)
def __str__(self):
return _('Service not available: Gajim is not running, or remote_control is False')
class DbusModuleMissing(Exception):
''' This exception indicates that there is no session daemon '''
class DbusNotSupported(Exception):
'''D-Bus is not installed or python bindings are missing'''
def __init__(self):
Exception.__init__(self)
def __str__(self):
return _('D-Bus python module is missing')
return _('D-Bus is not present on this machine or python module is missing')
try:
import dbus
except:
raise DbusModuleMissing
raise DbusNotSupported
_version = getattr(dbus, 'version', (0, 20, 0))
if _version[1] >= 41:
......
......@@ -515,7 +515,7 @@ class SignalObject(DbusPrototype):
add_contact = method(INTERFACE)(add_contact)
class SessionBusNotPresent(Exception):
''' This exception indicates that there is no session daemon '''
'''This exception indicates that there is no session daemon'''
def __init__(self):
Exception.__init__(self)
......@@ -523,9 +523,9 @@ class SessionBusNotPresent(Exception):
return _('Session bus is not available')
class DbusNotSupported(Exception):
''' D-Bus is not installed or python bindings are missing '''
'''D-Bus is not installed or python bindings are missing'''
def __init__(self):
Exception.__init__(self)
def __str__(self):
return _('D-Bus is not present on this machine')
return _('D-Bus is not present on this machine or python module is missing')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment