Skip to content

Commit

Permalink
Fix py3 docker-initialize.py
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Nov 11, 2019
1 parent e8e46da commit d5de869
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docker/docker-initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os
from contextlib import closing
import urllib2
import urllib.request, urllib.error, urllib.parse
from shutil import copy


Expand Down Expand Up @@ -53,7 +53,7 @@ def environment(self):
if not self._environment:
url = "http://rancher-metadata/latest/self/stack/environment_name"
try:
with closing(urllib2.urlopen(url)) as conn:
with closing(urllib.request.urlopen(url)) as conn:
self._environment = conn.read()
except Exception as err:
self.log("Couldn't get environment from rancher-metadata: %s.", err)
Expand All @@ -78,7 +78,7 @@ def conf(self, value):
def log(self, msg='', *args):
""" Log message to console
"""
print msg % args
print((msg % args))

def zope_mode(self):
""" Zope mode
Expand Down

0 comments on commit d5de869

Please sign in to comment.