Merge pull request #1044 from usrenmae/py3-compat
Move several steps closer to python3 compatibility
This commit is contained in:
commit
db3b4731cd
7 changed files with 10 additions and 8 deletions
|
|
@ -25,7 +25,7 @@ class Command(DocoptCommand):
|
|||
def dispatch(self, *args, **kwargs):
|
||||
try:
|
||||
super(Command, self).dispatch(*args, **kwargs)
|
||||
except SSLError, e:
|
||||
except SSLError as e:
|
||||
raise errors.UserError('SSL error: %s' % e)
|
||||
except ConnectionError:
|
||||
if call_silently(['which', 'docker']) != 0:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class LogPrinter(object):
|
|||
if monochrome:
|
||||
color_fn = no_color
|
||||
else:
|
||||
color_fn = color_fns.next()
|
||||
color_fn = next(color_fns)
|
||||
generators.append(self._make_log_generator(container, color_fn))
|
||||
|
||||
return generators
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
|||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from functools import reduce
|
||||
|
||||
|
||||
class Container(object):
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
|||
from __future__ import absolute_import
|
||||
import logging
|
||||
|
||||
from functools import reduce
|
||||
from .service import Service
|
||||
from .container import Container
|
||||
from docker.errors import APIError
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ class Service(object):
|
|||
|
||||
try:
|
||||
all_events = stream_output(build_output, sys.stdout)
|
||||
except StreamOutputError, e:
|
||||
except StreamOutputError as e:
|
||||
raise BuildError(self, unicode(e))
|
||||
|
||||
image_id = None
|
||||
|
|
@ -641,7 +641,7 @@ def merge_environment(options):
|
|||
else:
|
||||
env.update(options['environment'])
|
||||
|
||||
return dict(resolve_env(k, v) for k, v in env.iteritems())
|
||||
return dict(resolve_env(k, v) for k, v in env.items())
|
||||
|
||||
|
||||
def split_env(env):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue