mirror of
https://github.com/xcat2/confluent.git
synced 2026-04-30 20:37:47 +00:00
Write to stdout as binary
This allows better redirection. In python3, must write to sys.stdout.buffer. AttributeError for the unlikely event of a python2 based node being deployed.
This commit is contained in:
@@ -703,4 +703,7 @@ if __name__ == '__main__':
|
||||
elif checkonly:
|
||||
sys.stdout.write(mclient.check_connections())
|
||||
else:
|
||||
sys.stdout.write(mclient.grab_url(sys.argv[1], data).decode())
|
||||
try:
|
||||
sys.stdout.buffer.write(mclient.grab_url(sys.argv[1], data))
|
||||
except AttributeError:
|
||||
sys.stdout.write(mclient.grab_url(sys.argv[1], data))
|
||||
|
||||
Reference in New Issue
Block a user