summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2012-03-28 19:21:11 +0000
committerAlex Meade <alex.meade@rackspace.com>2012-03-28 15:25:45 -0400
commit998e57b29629946a9da96db3aed013ab895dc482 (patch)
treeadc70e871234435180c2a8de12f48e7a72fa71e8 /tools
parent930be36538e42effc0a3b03c9a3d8a06cb1693ed (diff)
Updated docstrings in /tools as per HACKING
Change-Id: I06db6653784eb298ef7f78ebe99865b9c635aade
Diffstat (limited to 'tools')
-rw-r--r--tools/install_venv.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 8d2d5ffb1..ffc5417e8 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -19,9 +19,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""
-Installation script for Nova's development virtualenv
-"""
+"""Installation script for Nova's development virtualenv."""
import optparse
import os
@@ -47,9 +45,9 @@ def check_python_version():
def run_command_with_code(cmd, redirect_output=True, check_exit_code=True):
- """
- Runs a command in an out-of-process shell, returning the
- output of that command. Working directory is ROOT.
+ """Runs a command in an out-of-process shell.
+
+ Returns the output of that command. Working directory is ROOT.
"""
if redirect_output:
stdout = subprocess.PIPE
@@ -92,7 +90,8 @@ class Distro(object):
"""Any distribution-specific post-processing gets done here.
In particular, this is useful for applying patches to code inside
- the venv."""
+ the venv.
+ """
pass
@@ -127,10 +126,11 @@ class Fedora(Distro):
This currently affects RHEL6.1, but the fix can safely be
applied to all RHEL and Fedora distributions.
- This can be removed when the fix is applied upstream
+ This can be removed when the fix is applied upstream.
Nova: https://bugs.launchpad.net/nova/+bug/884915
- Upstream: https://bitbucket.org/which_linden/eventlet/issue/89"""
+ Upstream: https://bitbucket.org/which_linden/eventlet/issue/89
+ """
# Install "patch" program if it's not there
if not self.check_pkg('patch'):
@@ -155,8 +155,10 @@ def check_dependencies():
def create_virtualenv(venv=VENV, no_site_packages=True):
- """Creates the virtual environment and installs PIP only into the
- virtual environment
+ """Creates the virtual environment and installs PIP.
+
+ Creates the virtual environment and installs PIP only into the
+ virtual environment.
"""
print 'Creating venv...',
if no_site_packages:
@@ -225,7 +227,7 @@ def print_help():
def parse_args():
- """Parse command-line arguments"""
+ """Parses command-line arguments."""
parser = optparse.OptionParser()
parser.add_option("-n", "--no-site-packages", dest="no_site_packages",
default=False, action="store_true",