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>2015-02-18 08:47:30 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2015-02-18 08:47:30 -0600
commitdb4a3b0426f4912639c142366ff27594d54ce360 (patch)
treefe258d4b663b9607230e456cfa25cdfe29cb3a70 /src/lib/Bcfg2/Server/Plugins/Packages/Source.py
parented9920711a6020fa01d564db34e0ee4800718cc6 (diff)
parent89e7afbf74ffbbb54dd892bf2c4245aedee2a832 (diff)
downloadbcfg2-db4a3b0426f4912639c142366ff27594d54ce360.tar.gz
bcfg2-db4a3b0426f4912639c142366ff27594d54ce360.tar.bz2
bcfg2-db4a3b0426f4912639c142366ff27594d54ce360.zip
Merge pull request #250 from stpierre/blanket-except-plugins-lint
Remove blanket excepts from plugins and lint
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):