Merge pull request #454 from mwhudson/no-network-no-snaps

do not show the snaplist if there is no network
This commit is contained in:
Michael Hudson-Doyle 2019-04-15 10:04:38 +12:00 committed by GitHub
commit 452b03b7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -156,8 +156,9 @@ class SnapListController(BaseController):
self.loader.start()
def default(self):
if self.loader.failed:
# If loading snaps failed, skip the screen.
if self.loader.failed or not self.base_model.network.has_network:
# If loading snaps failed or the network is disabled, skip the
# screen.
raise Skip()
if 'snaps' in self.answers:
to_install = {}