From e2e0c03f5a50b295ac68c9e0f92efc7a14235c96 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Tue, 22 Jul 2014 23:46:01 +0400 Subject: [PATCH] Remove sys.path modification Since (almost) all our projects are already using console_scripts even for testing and this code is "backdoor in the waiting" (as Thierry said), this code should be thrown away. Change-Id: I8a7ac057b2251f9ae0d78d1f3f7943f4627fe248 --- oslo/rootwrap/cmd.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/oslo/rootwrap/cmd.py b/oslo/rootwrap/cmd.py index 7d6fbed..498ae20 100644 --- a/oslo/rootwrap/cmd.py +++ b/oslo/rootwrap/cmd.py @@ -41,6 +41,8 @@ import sys from six import moves +from oslo.rootwrap import wrapper + RC_UNAUTHORIZED = 99 RC_NOCOMMAND = 98 RC_BADCONFIG = 97 @@ -78,14 +80,6 @@ def main(): configfile = sys.argv.pop(0) userargs = sys.argv[:] - # Add ../ to sys.path to allow running from branch - possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname), - os.pardir, os.pardir)) - if os.path.exists(os.path.join(possible_topdir, "oslo", "__init__.py")): - sys.path.insert(0, possible_topdir) - - from oslo.rootwrap import wrapper - # Load configuration try: rawconfig = moves.configparser.RawConfigParser()