Fix TypeError in Exception handling

Traceback (most recent call last):
  File "/tmp/tmp.02tgGaAGtW/docker-compose/bin/docker-compose", line 11, in <module>
    sys.exit(main())
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 68, in main
    log_api_error(e)
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 89, in log_api_error
    if 'client is newer than server' in e.explanation:
TypeError: 'str' does not support the buffer interface

Signed-off-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
Thomas Grainger 2016-03-17 13:59:51 +00:00
commit 20bf05a6e3
2 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ def handle_connection_errors(client):
def log_api_error(e, client_version):
if 'client is newer than server' not in e.explanation:
if b'client is newer than server' not in e.explanation:
log.error(e.explanation)
return