Skip to content

Commit 4ef502d

Browse files
committed
autopep8
1 parent 80ccb59 commit 4ef502d

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

lib/spack/spack/binary_distribution.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def build_tarball(spec, outdir, force=False, key=None):
144144
if force:
145145
os.remove(spackfile_path)
146146
else:
147-
tty.warn("file exists, use -f to force overwrite: %s" % spackfile_path)
147+
tty.warn("file exists, use -f to force overwrite: %s" %
148+
spackfile_path)
148149
return
149150

150151
spec_file = join_path(spec.prefix, ".spack", "spec.yaml")
@@ -240,7 +241,7 @@ def relocate_package(package):
240241
return True # No need to relocate
241242

242243
tty.msg("Relocating package from",
243-
"%s to %s." % (old_path, new_path))
244+
"%s to %s." % (old_path, new_path))
244245

245246
# as we may need patchelf, find out where it is
246247
patchelf_executable = ''

lib/spack/spack/cmd/buildcache.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,26 @@ def setup_parser(subparser):
4444

4545
create = subparsers.add_parser('create')
4646
create.add_argument('-f', '--force', action='store_true',
47-
help="overwrite tarball if it exists.")
48-
create.add_argument('-d', '--directory', metavar='directory',
49-
type=str, default='.',
50-
help="directory in which to save the tarballs.")
47+
help="overwrite tarball if it exists.")
48+
create.add_argument('-d', '--directory', metavar='directory',
49+
type=str, default='.',
50+
help="directory in which to save the tarballs.")
5151
create.add_argument(
5252
'packages', nargs=argparse.REMAINDER,
5353
help="specs of packages to package")
5454
create.set_defaults(func=createtarball)
5555

5656
install = subparsers.add_parser('install')
5757
install.add_argument('-f', '--force', action='store_true',
58-
help="overwrite install directory if it exists.")
58+
help="overwrite install directory if it exists.")
5959
install.add_argument(
6060
'packages', nargs=argparse.REMAINDER,
6161
help="specs of packages to package")
6262
install.set_defaults(func=installtarball)
6363

64+
6465
def createtarball(args):
65-
if not args.packages :
66+
if not args.packages:
6667
tty.die("build cache file creation requires at least one" +
6768
" installed package argument")
6869
pkgs = set(args.packages)
@@ -81,8 +82,9 @@ def createtarball(args):
8182
tty.msg('creating binary cache file for package %s ' % spec)
8283
build_tarball(spec, outdir, args.force)
8384

85+
8486
def installtarball(args):
85-
if not args.packages :
87+
if not args.packages:
8688
tty.die("build cache file installation requires at least one" +
8789
" package argument")
8890
pkgs = set(args.packages)
@@ -110,6 +112,7 @@ def installtarball(args):
110112
else:
111113
tty.die("Download of binary cache file for spec %s failed." % spec)
112114

115+
113116
def buildcache(parser, args):
114117
if args.func:
115118
args.func(args)

0 commit comments

Comments
 (0)