Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Do not crash if self.settings cannot be loaded. Need to check why thi…
Browse files Browse the repository at this point in the history
…s happens, though.
  • Loading branch information
karasu committed Sep 30, 2018
1 parent 64531df commit ddb3ad8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You are viewing the `0.16.x` branch (stable).

|Development Stage|Branch|Version| Code Status|
----------------- | -------------- | -------------- | -------- |
|Cnchi Stable|0.16.x|![0.16.8](https://img.shields.io/github/release/antergos/cnchi.svg)|Frozen|
|Cnchi Stable|0.16.x|![0.16.9](https://img.shields.io/github/release/antergos/cnchi.svg)|Frozen|
|Cnchi Development|0.17.x|![0.17.1](https://img.shields.io/github/release/antergos/cnchi/all.svg)|Development|
|Cnchi Next (UI agnostic)|master|master|Development|

Expand Down
2 changes: 1 addition & 1 deletion src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.16.8"
CNCHI_VERSION = "0.16.9"
""" Cnchi version """

CNCHI_WEBSITE = "http://www.antergos.com"
Expand Down
47 changes: 27 additions & 20 deletions src/pages/slides.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def reveal_next_slide(self):
# Reveal image
self.revealer.set_reveal_child(True)
except FileNotFoundError:
# FIXME: Installation process finishes before we can read these values ?¿
logging.warning("Can't get configuration values.")
self.stop_slideshow = True

def image_revealed(self, revealer, _revealed):
Expand Down Expand Up @@ -210,10 +212,8 @@ def manage_events_from_cb_queue(self):
self.downloads_progress_bar.set_fraction(float(event[1]))
elif event[0] == 'progress_bar_show_text':
if event[1]:
# self.progress_bar.set_show_text(True)
self.progress_bar.set_text(event[1])
else:
# self.progress_bar.set_show_text(False)
self.progress_bar.set_text("")
elif event[0] == 'progress_bar':
if event[1] == 'hide':
Expand Down Expand Up @@ -246,6 +246,8 @@ def manage_events_from_cb_queue(self):
logging.debug(
'Adding %s to cache_pkgs_md5_check_failed list', event[1])
self.settings.set('cache_pkgs_md5_check_failed', event[1])
else:
logging.warning("Event %s not recognised. Ignoring.", event[0])

self.callback_queue.task_done()

Expand Down Expand Up @@ -279,24 +281,29 @@ def installation_finished(self):

self.stop_slideshow = True

bootloader_install = self.settings.get('bootloader_install')
bootloader_install_ok = self.settings.get('bootloader_installation_successful')

if bootloader_install and not bootloader_install_ok:
# Warn user about GRUB and ask if we should open wiki page.
boot_warn = _(
"IMPORTANT: There may have been a problem with the bootloader installation which "
"could prevent your system from booting properly. Before rebooting, you may want "
"to verify whether or not the bootloader is installed and configured.\n\n"
"The Arch Linux Wiki contains troubleshooting information:\n"
"\thttps://wiki.archlinux.org/index.php/GRUB\n\n"
"Would you like to view the wiki page now?")
response = show.question(self.get_main_window(), boot_warn)
if response == Gtk.ResponseType.YES:
import webbrowser
misc.drop_privileges()
wiki_url = 'https://wiki.archlinux.org/index.php/GRUB'
webbrowser.open(wiki_url)
try:
bootloader_install = self.settings.get('bootloader_install')
bootloader_install_ok = self.settings.get('bootloader_installation_successful')

if bootloader_install and not bootloader_install_ok:
# Warn user about GRUB and ask if we should open wiki page.
boot_warn = _(
"IMPORTANT: There may have been a problem with the bootloader installation "
"which could prevent your system from booting properly. Before rebooting, "
"you may want to verify whether or not the bootloader is installed and "
"configured.\n\n"
"The Arch Linux Wiki contains troubleshooting information:\n"
"\thttps://wiki.archlinux.org/index.php/GRUB\n\n"
"Would you like to view the wiki page now?")
response = show.question(self.get_main_window(), boot_warn)
if response == Gtk.ResponseType.YES:
import webbrowser
misc.drop_privileges()
wiki_url = 'https://wiki.archlinux.org/index.php/GRUB'
webbrowser.open(wiki_url)
except FileNotFoundError:
# FIXME: Installation process finishes before we can read these values ?¿
logging.warning("Can't get configuration values.")

install_ok = _(
"Installation Complete!\n"
Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.16.8","files":[
{"version":"0.16.9","files":[
]}

0 comments on commit ddb3ad8

Please sign in to comment.