-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
This isn't so great:
baisang@redacted ~> fpb logs.zip
Traceback (most recent call last):
File "/usr/bin/fpb", line 11, in <module>
sys.exit(paste_main())
File "/opt/venvs/fluffy/lib/python3.6/site-packages/fluffy_cli/main.py", line 200, in paste_main
return paste(args.server, args.file, args.language, args.regex, auth, args.direct_link, args.tee)
File "/opt/venvs/fluffy/lib/python3.6/site-packages/fluffy_cli/main.py", line 95, in paste
content = f.read()
File "/opt/venvs/fluffy/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x91 in position 12: invalid start byte
Let's detect when given a binary file and either upload it as a file automatically, or suggest using fput instead. It definitely shouldn't crash like this.