From 2bd6e0690fbea4c5e9c1021351ddc50cacf8b515 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Sun, 22 May 2016 11:53:34 -0400 Subject: [PATCH] Updated configure_pg_sources --- hooks/neutron_plumgrid_hooks.py | 3 +-- hooks/neutron_plumgrid_utils.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hooks/neutron_plumgrid_hooks.py b/hooks/neutron_plumgrid_hooks.py index f50e0d8..21c0d85 100755 --- a/hooks/neutron_plumgrid_hooks.py +++ b/hooks/neutron_plumgrid_hooks.py @@ -67,8 +67,7 @@ def config_changed(): charm_config.changed('install_keys')): 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() apt_update() pkgs = determine_packages() diff --git a/hooks/neutron_plumgrid_utils.py b/hooks/neutron_plumgrid_utils.py index 797d353..782f65a 100644 --- a/hooks/neutron_plumgrid_utils.py +++ b/hooks/neutron_plumgrid_utils.py @@ -75,9 +75,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():