summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2013-06-02 14:20:37 -0500
committerSol Jerome <sol.jerome@gmail.com>2013-06-02 14:20:37 -0500
commit9de1086c937c5f8919cb279e7f601d7de064f901 (patch)
tree83362fdb6ee6bfb17bc8aa1477cb5c06f54022ca /src/lib/Bcfg2/Server/Plugins
parentfdeba3b8f2cea7ecb2200cab42ce28fd1e1e6a5c (diff)
parent521862b6584eb4d68e12df5d1a5c4f7a8ef1bdf5 (diff)
downloadbcfg2-9de1086c937c5f8919cb279e7f601d7de064f901.tar.gz
bcfg2-9de1086c937c5f8919cb279e7f601d7de064f901.tar.bz2
bcfg2-9de1086c937c5f8919cb279e7f601d7de064f901.zip
Merge branch 'maint'
Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/installation/distributions.txt doc/server/snapshots/index.txt src/lib/Bcfg2/Server/Plugin/helpers.py src/sbin/bcfg2-server
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py4
-rw-r--r--src/lib/Bcfg2/Server/Plugins/FileProbes.py6
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Yum.py4
3 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
index 3e464af49..7af69ec81 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
@@ -484,7 +484,9 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet,
return
elif hdlr.ignore(event, basename=self.path):
return
- elif action == 'changed':
+ # we only get here if event.filename in self.entries, so handle
+ # created event like changed
+ elif action == 'changed' or action == 'created':
self.entries[event.filename].handle_event(event)
return
elif action == 'deleted':
diff --git a/src/lib/Bcfg2/Server/Plugins/FileProbes.py b/src/lib/Bcfg2/Server/Plugins/FileProbes.py
index 316e4bc53..a3bba14f3 100644
--- a/src/lib/Bcfg2/Server/Plugins/FileProbes.py
+++ b/src/lib/Bcfg2/Server/Plugins/FileProbes.py
@@ -25,7 +25,11 @@ import sys
import pwd
import grp
import Bcfg2.Client.XML
-from Bcfg2.Compat import b64encode, oct_mode
+try:
+ from Bcfg2.Compat import b64encode, oct_mode
+except ImportError:
+ from base64 import b64encode
+ oct_mode = oct
path = "%s"
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
index b544eb47e..a4b17f05a 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
@@ -1105,9 +1105,9 @@ class YumSource(Source):
self.packages['global'] = copy.deepcopy(sdata.pop())
except IndexError:
self.logger.error("Packages: No packages in repo")
+ self.packages['global'] = set()
while sdata:
- self.packages['global'] = \
- self.packages['global'].intersection(sdata.pop())
+ self.packages['global'].update(sdata.pop())
for key in self.packages:
if key == 'global':