summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-01-29 16:56:44 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-01-29 16:56:44 +0000
commita331cc8dc2527f6eb8dcf895121d18773b8e76d9 (patch)
tree4ad236db53663de8d9aa6cba0fa2cfd76d778379 /src/lib/Client
parent2c4db25b0ff7a897bae79db417e7183ba0336f5a (diff)
downloadbcfg2-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/Client')
-rw-r--r--src/lib/Client/Tools/POSIX.py6
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