##// END OF EJS Templates
tests: test-archive.t use sys.stdout.buffer for binary output in py3
timeless -
r29182:6c0b1d96 default
parent child Browse files
Show More
@@ -86,9 +86,13 b' invalid arch type should give 404'
86 86 > node, archive, file = sys.argv[1:]
87 87 > requeststr = 'cmd=archive;node=%s;type=%s;file=%s' % (node, archive, file)
88 88 > try:
89 > stdout = sys.stdout.buffer
90 > except AttributeError:
91 > stdout = sys.stdout
92 > try:
89 93 > f = urllib2.urlopen('http://127.0.0.1:%s/?%s'
90 94 > % (os.environ['HGPORT'], requeststr))
91 > sys.stdout.write(f.read())
95 > stdout.write(f.read())
92 96 > except urllib2.HTTPError, e:
93 97 > sys.stderr.write(str(e) + '\n')
94 98 > EOF
General Comments 0
You need to be logged in to leave comments. Login now