move protocol check before super
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4356c156 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4356c156 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4356c156 Branch: refs/heads/trunk Commit: 4356c156ff4a46f0d604435317416ffdb363c5f4 Parents: 062e387 Author: Mario Loria <ma...@arroyonetworks.com> Authored: Thu Oct 6 21:17:08 2016 -0400 Committer: Anthony Shaw <anthonys...@apache.org> Committed: Sat Oct 8 13:29:22 2016 +1100 ---------------------------------------------------------------------- libcloud/container/drivers/rancher.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/4356c156/libcloud/container/drivers/rancher.py ---------------------------------------------------------------------- diff --git a/libcloud/container/drivers/rancher.py b/libcloud/container/drivers/rancher.py index 2a6b8d5..66f8040 100644 --- a/libcloud/container/drivers/rancher.py +++ b/libcloud/container/drivers/rancher.py @@ -128,11 +128,13 @@ class RancherContainerDriver(ContainerDriver): :return: ``None`` """ + + if host.startswith('http://'): + secure = False + super(RancherContainerDriver, self).__init__(key=key, secret=secret, secure=secure, host=host, port=port) - if host.startswith('http://'): - secure = False # strip the prefix prefixes = ['http://', 'https://']