diff options
author | Tristan Carel <tristan.carel@gmail.com> | 2019-03-13 02:34:47 +0100 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-03-12 20:34:47 -0500 |
commit | c3662492deed98557df9ba1e155124be7f08feb2 (patch) | |
tree | 157ad6ddde9055f1232a7b834b0df8aad4269506 /lib | |
parent | 3d7164c13f35128897c97708cb26bd07744c671c (diff) | |
download | spack-c3662492deed98557df9ba1e155124be7f08feb2.tar.gz spack-c3662492deed98557df9ba1e155124be7f08feb2.tar.bz2 spack-c3662492deed98557df9ba1e155124be7f08feb2.tar.xz spack-c3662492deed98557df9ba1e155124be7f08feb2.zip |
Do not use `string` module to be compatible with python 3 (#248) (#10667)
`string.find` is not part of Python 3 anymore.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/setup.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py index c4448e1605..aa391b2b35 100644 --- a/lib/spack/spack/cmd/setup.py +++ b/lib/spack/spack/cmd/setup.py @@ -6,7 +6,6 @@ import argparse import copy import os -import string import sys import llnl.util.tty as tty @@ -85,7 +84,7 @@ env = dict(os.environ) env_vars = sorted(list(env.keys())) for name in env_vars: val = env[name] - if string.find(name, 'PATH') < 0: + if name.find('PATH') < 0: fout.write('env[%s] = %s\n' % (repr(name), repr(val))) else: if name == 'SPACK_TRANSITIVE_INCLUDE_PATH': @@ -95,7 +94,7 @@ env = dict(os.environ) fout.write( 'env[%s] = "%s".join(cmdlist("""\n' % (repr(name), sep)) - for part in string.split(val, sep): + for part in val.split(sep): fout.write(' %s\n' % part) fout.write('"""))\n') |