summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Bcfg2Py3k.py6
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/Inotify.py5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Bcfg2Py3k.py b/src/lib/Bcfg2/Bcfg2Py3k.py
index 30feaf8c5..3dc6fc6f0 100644
--- a/src/lib/Bcfg2/Bcfg2Py3k.py
+++ b/src/lib/Bcfg2/Bcfg2Py3k.py
@@ -82,6 +82,12 @@ try:
except:
input = input
+try:
+ reduce = reduce
+except NameError:
+ import functools
+ reduce = functools.reduce
+
if sys.hexversion >= 0x03000000:
from io import FileIO as file
else:
diff --git a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
index 7362432b8..880ac7e8d 100644
--- a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
+++ b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
@@ -1,10 +1,11 @@
""" Inotify driver for file alteration events """
-import os
-import sys
import logging
import operator
+import os
import pyinotify
+import sys
+from Bcfg2.Bcfg2Py3k import reduce
from Bcfg2.Server.FileMonitor import Event
from Bcfg2.Server.FileMonitor.Pseudo import Pseudo