From 4999e4d5f3a356f271b15b5983a51a914dca22d3 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Sun, 22 May 2016 11:19:46 -0400 Subject: [PATCH] Updated configure_pg_sources --- hooks/pg_gw_hooks.py | 3 +-- hooks/pg_gw_utils.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hooks/pg_gw_hooks.py b/hooks/pg_gw_hooks.py index 10b5791..5818cea 100755 --- a/hooks/pg_gw_hooks.py +++ b/hooks/pg_gw_hooks.py @@ -94,8 +94,7 @@ def config_changed(): stop_pg() status_set('maintenance', 'Upgrading apt packages') if charm_config.changed('install_sources'): - if not configure_pg_sources(): - log('IOError: /etc/apt/sources.list couldn\'t be updated') + configure_pg_sources() configure_sources(update=True) pkgs = determine_packages() for pkg in pkgs: diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py index 7e77a06..98ad4a4 100644 --- a/hooks/pg_gw_utils.py +++ b/hooks/pg_gw_utils.py @@ -91,9 +91,8 @@ def configure_pg_sources(): sources.write(i) sources.truncate() sources.close() - return True except IOError: - return False + raise IOError('Unable to access /etc/apt/sources.list') def determine_packages():