Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import pluginmanager
import schedule
from storagesize import StorageSize, SizeUnit
from exceptions import PermissionDeniedByPolicy
from exceptions import PermissionDeniedByPolicy, Timeout


class Config(configfile.ConfigFileWithProfiles):
Expand Down Expand Up @@ -1534,6 +1534,15 @@ def _setup_event_based_automation(self):
self.notifyError(str(err))
return False

except Timeout:
msg = _(
'Timed out while waiting for the authentication dialog. '
'Please try again.'
)
logger.error(msg, self)
self.notifyError(msg)
return False

def _setup_schedule_based_automation(self):
"""Update the current users crontab file based on profile settings.

Expand Down
3 changes: 3 additions & 0 deletions common/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,9 @@ def save(self):
== 'com.ubuntu.DeviceDriver.PermissionDeniedByPolicy'):
raise PermissionDeniedByPolicy(str(err)) from err

if err._dbus_error_name == 'org.freedesktop.DBus.Error.NoReply':
raise Timeout() from err

raise err

def clean(self):
Expand Down