diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 13:32:51 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 13:33:20 -0400 |
commit | 22016ee593d6047855964734a17120d2aea6b5a5 (patch) | |
tree | 92adbca098e89295d4217561ee53454134b781a2 /src/lib/Bcfg2/Server/Plugins/DBStats.py | |
parent | d6bf20100848dc61b971844e21d24da44b9f65f7 (diff) | |
download | bcfg2-22016ee593d6047855964734a17120d2aea6b5a5.tar.gz bcfg2-22016ee593d6047855964734a17120d2aea6b5a5.tar.bz2 bcfg2-22016ee593d6047855964734a17120d2aea6b5a5.zip |
lots of various py3k fixes
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/DBStats.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/DBStats.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/DBStats.py b/src/lib/Bcfg2/Server/Plugins/DBStats.py index b8750f850..63c590f0f 100644 --- a/src/lib/Bcfg2/Server/Plugins/DBStats.py +++ b/src/lib/Bcfg2/Server/Plugins/DBStats.py @@ -1,4 +1,3 @@ -import binascii import difflib import logging import lxml.etree @@ -14,6 +13,8 @@ except ImportError: import Bcfg2.Server.Plugin from Bcfg2.Server.Reports.importscript import load_stat from Bcfg2.Server.Reports.reports.models import Client +from Bcfg2.Bcfg2Py3k import b64decode + # for debugging output only logger = logging.getLogger('Bcfg2.Plugins.DBStats') @@ -88,7 +89,7 @@ class DBStats(Bcfg2.Server.Plugin.ThreadedStatistics, ret.append('\n'.join(entry.reason.unpruned)) elif entry.reason.current_diff != '': if entry.reason.is_binary: - ret.append(binascii.a2b_base64(entry.reason.current_diff)) + ret.append(b64decode(entry.reason.current_diff)) else: ret.append('\n'.join(difflib.restore(\ entry.reason.current_diff.split('\n'), 1))) |