summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2014-12-09 11:10:24 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2015-02-18 08:24:24 -0600
commit89e7afbf74ffbbb54dd892bf2c4245aedee2a832 (patch)
treeed4623b5c6e39d80c132e9f21f3d4804cabd93be /src/lib/Bcfg2/Server/Plugins/Packages/Source.py
parent64b458b380620f84843b1841b441745a0984946f (diff)
downloadbcfg2-89e7afbf74ffbbb54dd892bf2c4245aedee2a832.tar.gz
bcfg2-89e7afbf74ffbbb54dd892bf2c4245aedee2a832.tar.bz2
bcfg2-89e7afbf74ffbbb54dd892bf2c4245aedee2a832.zip
Remove blanket excepts from plugins and lint
This removes most blanket except: clauses from all plugins, including the base plugin libraries, and bcfg2-lint. The few that remain should all be necessary. Most of the changes were quite minor, but this did require some restructuring of the CfgPrivateKeyCreator; as a result, the tests for that module were rewritten.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Source.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Source.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
index 67ada2399..c9f6ea14a 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
@@ -331,10 +331,11 @@ class Source(Debuggable): # pylint: disable=R0902
@track_statistics()
def setup_data(self, force_update=False):
- """ Perform all data fetching and setup tasks. For most
- backends, this involves downloading all metadata from the
- repository, parsing it, and caching the parsed data locally.
- The order of operations is:
+ """Perform all data fetching and setup tasks.
+
+ For most backends, this involves downloading all metadata from
+ the repository, parsing it, and caching the parsed data
+ locally. The order of operations is:
#. Call :func:`load_state` to try to load data from the local
cache.
@@ -352,6 +353,15 @@ class Source(Debuggable): # pylint: disable=R0902
upstream repository.
:type force_update: bool
"""
+ # there are a bunch of wildcard except statements here,
+ # because the various functions called herein (``load_state``,
+ # ``read_files``, ``update``) are defined entirely by the
+ # Packages plugins that implement them.
+ #
+ # TODO: we should define an exception subclass that each of
+ # these functions can raise when an *expected* error condition
+ # is encountered.
+ #
# pylint: disable=W0702
if not force_update:
if os.path.exists(self.cachefile):