From aca6c6979e70bbeafe43c91bd14f7c65a885e6eb Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Fri, 30 Nov 2007 10:28:00 +0000 Subject: [PATCH] cat: fix the test if the file is binary, which swallowed the first 4098 bytes --- osc/commandline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 29939694..493e3324 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1913,7 +1913,7 @@ class Osc(cmdln.Cmdln): import tempfile (fd, filename) = tempfile.mkstemp(prefix = 'osc_%s.' % args[2], dir = '/tmp') get_source_file(conf.config['apiurl'], args[0], args[1], args[2], targetfilename=filename) - if binary(os.read(fd, 4098)): + if binary_file(filename): print >>sys.stderr, 'error - cannot display binary file \'%s\'' % args[2] else: print '### Beginning of file: \'%s\' ###' % filename