Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Fix compilation error when running under Python 3.4 #579

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions container/docker/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@

from ruamel.yaml.comments import CommentedMap
from six import reraise, iteritems, string_types, PY3

if PY3:
from functools import reduce
try:
import httplib as StatusCodes
except ImportError:

try: # Python 3.5+
from http import HTTPStatus as StatusCodes
except ImportError:
try: # Python 3
from http import client as StatusCodes
except ImportError: # Python 2
import httplib as StatusCodes

import container
from container import host_only, conductor_only
Expand Down