Fix: reset hostname for each request
Some checks failed
buildbot/travis_bionic Build done.

This commit is contained in:
Peter Šurda 2021-07-31 13:55:58 +08:00
parent e5b9d45a59
commit 0ee0ac4936
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -60,7 +60,7 @@ class CloudInitApp:
try:
self.hostinfo = socket.gethostbyaddr(self.remoteip)
except socket.herror:
pass
self.hostinfo = ('localhost', )
def _redirect_if_needed(self):
filepath = os.path.join(PATH, "data", self.hostinfo[0],