You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.6.9 and 3.5.2 (virtual envs, cloudflare-2.3.1)
$ cli4 -q /ips
Traceback (most recent call last):
File "/tmp/python3-venv-20191218/bin/cli4", line 8, in <module>
sys.exit(main())
File "/tmp/python3-venv-20191218/lib/python3.6/site-packages/cli4/__main__.py", line 13, in main
cli4(args)
File "/tmp/python3-venv-20191218/lib/python3.6/site-packages/cli4/cli4.py", line 367, in cli4
do_it(args)
File "/tmp/python3-venv-20191218/lib/python3.6/site-packages/cli4/cli4.py", line 362, in do_it
write_results(results, output)
File "/tmp/python3-venv-20191218/lib/python3.6/site-packages/cli4/cli4.py", line 199, in write_results
sys.stdout.write(results)
TypeError: write() argument must be str, not dict
Or python 2.7.12 (Ubuntu 16.04 w/ pip install cloudflare, 2.3.1)
$ cli4 -q /ips
Traceback (most recent call last):
File "/usr/local/bin/cli4", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/cli4/__main__.py", line 13, in main
cli4(args)
File "/usr/local/lib/python2.7/dist-packages/cli4/cli4.py", line 367, in cli4
do_it(args)
File "/usr/local/lib/python2.7/dist-packages/cli4/cli4.py", line 362, in do_it
write_results(results, output)
File "/usr/local/lib/python2.7/dist-packages/cli4/cli4.py", line 199, in write_results
sys.stdout.write(results)
TypeError: expected a string or other character buffer object
The --quiet option sets output to None, but write_results doesn't handle this case. So in this example, results is a dict, is not modified within write_results, and so the call to sys.stdout.write throws the above exception because it is not a string.
Expected results: --quiet should not output anything, not even a newline
The text was updated successfully, but these errors were encountered:
Python 3.6.9 and 3.5.2 (virtual envs, cloudflare-2.3.1)
Or python 2.7.12 (Ubuntu 16.04 w/
pip install cloudflare
, 2.3.1)The
--quiet
option setsoutput
toNone
, butwrite_results
doesn't handle this case. So in this example,results
is a dict, is not modified withinwrite_results
, and so the call tosys.stdout.write
throws the above exception because it is not a string.Expected results:
--quiet
should not output anything, not even a newlineThe text was updated successfully, but these errors were encountered: