From 9389a33a5296abae5dc32485ef816025c445e8a1 Mon Sep 17 00:00:00 2001 From: Kushal Agrawal Date: Mon, 21 May 2018 14:58:33 +0530 Subject: [PATCH] Restructured import os to be effective in monkey_patching Change-Id: Ib12b1a8d515450a8c3ba39c7494ee9e5de80f24c --- glare/cmd/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glare/cmd/api.py b/glare/cmd/api.py index 6021f2a..a522195 100755 --- a/glare/cmd/api.py +++ b/glare/cmd/api.py @@ -19,7 +19,6 @@ Glare (Glare Artifact Repository) API service. """ -import os import sys import eventlet @@ -28,6 +27,8 @@ from oslo_utils import encodeutils eventlet.patcher.monkey_patch(all=False, socket=True, time=True, select=True, thread=True, os=True, MySQLdb=True) +import os + # If ../glare/__init__.py exists, add ../ to Python search path, so that # it will override what happens to be installed in /usr/(local/)lib/python... possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),