diff options
author | Dirk Mallunat <s4msung@exigen.org> | 2016-07-08 20:36:30 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-08 20:47:31 +0200 |
commit | 74af7b06ba8ff2f1953816fe64fc9fa76148f3d5 (patch) | |
tree | db1838f70c468f64c5d75b85e59775da869ccf6c | |
parent | 977392aadcb8efea7d00c248f380ef361a7df1f9 (diff) |
read binary from stdin
-rwxr-xr-x | fb.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -662,9 +662,9 @@ class FBClient: tempfile = os.path.join(self.tempdir, os.path.basename(self.args.name)) if sys.stdin.isatty(): print("^C to exit, ^D to send") - f = open(tempfile, "w") + f = open(tempfile, "wb") try: - f.write(sys.stdin.read()) + f.write(sys.stdin.buffer.read()) except KeyboardInterrupt: sys.exit(130) finally: |