From b4826d85c25a56ad95ffb76c467cdb459daba0c4 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Fri, 3 May 2013 06:45:51 +1000 Subject: Update oslo-incubator import. These are all minor changes bringing nova up to commit 90e83530d4dc49d570fa05ea63a93805717dcfa0 in oslo-incubator. Change-Id: I0291eed31b1e650da211fe2a8b65fad0c35c9053 --- tools/install_venv_common.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index f0a1722c3..0401a958f 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -18,10 +18,13 @@ """Provides methods needed by installation script for OpenStack development virtual environments. +Since this script is used to bootstrap a virtualenv from the system's Python +environment, it should be kept strictly compatible with Python 2.6. + Synced in from openstack-common """ -import argparse +import optparse import os import subprocess import sys @@ -131,12 +134,12 @@ class InstallVenv(object): def parse_args(self, argv): """Parses command-line arguments.""" - parser = argparse.ArgumentParser() - parser.add_argument('-n', '--no-site-packages', - action='store_true', - help="Do not inherit packages from global Python " - "install") - return parser.parse_args(argv[1:]) + parser = optparse.OptionParser() + parser.add_option('-n', '--no-site-packages', + action='store_true', + help="Do not inherit packages from global Python " + "install") + return parser.parse_args(argv[1:])[0] class Distro(InstallVenv): -- cgit