summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-08-09 13:23:53 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-10 16:33:37 -0700
commitbf1072c9022cd161b9cc4860e5403a463bc0e05b (patch)
tree67c405d88312d151a65111fbece886084c706eef /bin
parent8061deb883c84016f282f7e388c3c019af86b4ca (diff)
downloadspack-bf1072c9022cd161b9cc4860e5403a463bc0e05b.tar.gz
spack-bf1072c9022cd161b9cc4860e5403a463bc0e05b.tar.bz2
spack-bf1072c9022cd161b9cc4860e5403a463bc0e05b.tar.xz
spack-bf1072c9022cd161b9cc4860e5403a463bc0e05b.zip
Make Spack core PEP8 compliant.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/spack b/bin/spack
index e9307d1485..9fed11f33b 100755
--- a/bin/spack
+++ b/bin/spack
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# flake8: noqa
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
@@ -24,9 +25,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import sys
-if not sys.version_info[:2] >= (2,6):
+if not sys.version_info[:2] >= (2, 6):
v_info = sys.version_info[:3]
- sys.exit("Spack requires Python 2.6 or higher. This is Python %d.%d.%d." % v_info)
+ sys.exit("Spack requires Python 2.6 or higher. "
+ "This is Python %d.%d.%d." % v_info)
import os
@@ -62,7 +64,8 @@ for pyc_file in orphaned_pyc_files:
try:
os.remove(pyc_file)
except OSError as e:
- print "WARNING: Spack may fail mysteriously. Couldn't remove orphaned .pyc file: %s" % pyc_file
+ print ("WARNING: Spack may fail mysteriously. "
+ "Couldn't remove orphaned .pyc file: %s" % pyc_file)
# If there is no working directory, use the spack prefix.
try:
@@ -128,6 +131,7 @@ if len(sys.argv) == 1:
# actually parse the args.
args = parser.parse_args()
+
def main():
# Set up environment based on args.
tty.set_verbose(args.verbose)
@@ -148,7 +152,7 @@ def main():
# If the user asked for it, don't check ssl certs.
if args.insecure:
- tty.warn("You asked for --insecure, which does not check SSL certificates.")
+ tty.warn("You asked for --insecure. Will NOT check SSL certificates.")
spack.curl.add_default_arg('-k')
# Try to load the particular command asked for and run it
@@ -167,7 +171,8 @@ def main():
elif isinstance(return_val, int):
sys.exit(return_val)
else:
- tty.die("Bad return value from command %s: %s" % (args.command, return_val))
+ tty.die("Bad return value from command %s: %s"
+ % (args.command, return_val))
if args.profile:
import cProfile