Browse Source

Updated configure_pg_sources

Junaid Ali 2 years ago
parent
commit
4999e4d5f3
2 changed files with 2 additions and 4 deletions
  1. 1
    2
      hooks/pg_gw_hooks.py
  2. 1
    2
      hooks/pg_gw_utils.py

+ 1
- 2
hooks/pg_gw_hooks.py View File

@@ -94,8 +94,7 @@ def config_changed():
94 94
         stop_pg()
95 95
         status_set('maintenance', 'Upgrading apt packages')
96 96
         if charm_config.changed('install_sources'):
97
-            if not configure_pg_sources():
98
-                log('IOError: /etc/apt/sources.list couldn\'t be updated')
97
+            configure_pg_sources()
99 98
         configure_sources(update=True)
100 99
         pkgs = determine_packages()
101 100
         for pkg in pkgs:

+ 1
- 2
hooks/pg_gw_utils.py View File

@@ -91,9 +91,8 @@ def configure_pg_sources():
91 91
                 sources.write(i)
92 92
             sources.truncate()
93 93
         sources.close()
94
-        return True
95 94
     except IOError:
96
-        return False
95
+        raise IOError('Unable to access /etc/apt/sources.list')
97 96
 
98 97
 
99 98
 def determine_packages():

Loading…
Cancel
Save