diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-01-29 16:56:44 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-01-29 16:56:44 +0000 |
commit | a331cc8dc2527f6eb8dcf895121d18773b8e76d9 (patch) | |
tree | 4ad236db53663de8d9aa6cba0fa2cfd76d778379 /src/lib | |
parent | 2c4db25b0ff7a897bae79db417e7183ba0336f5a (diff) | |
download | bcfg2-a331cc8dc2527f6eb8dcf895121d18773b8e76d9.tar.gz bcfg2-a331cc8dc2527f6eb8dcf895121d18773b8e76d9.tar.bz2 bcfg2-a331cc8dc2527f6eb8dcf895121d18773b8e76d9.zip |
Fix traceback for binary files
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2724 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Tools/POSIX.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index e1e0a2265..ce4bb7051 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -206,7 +206,11 @@ class POSIX(Bcfg2.Client.Tools.Tool): pass udiff = '\n'.join([x for x in difflib.unified_diff(content.split('\n'), \ tempdata.split('\n'))]) - entry.set('qtext', udiff.encode('ascii') + "\nInstall ConfigFile %s: (y/N) " % \ + try: + eudiff = udiff.encode('ascii') + except: + eudiff = "No diff available" + entry.set('qtext', eudiff + "\nInstall ConfigFile %s: (y/N) " % \ (entry.get('name'))) return contentStatus and permissionStatus |