Improve spack checksum formatting (#13666)

* Improve spack checksum formatting

* Add colon

* Fix Python 2 bug
This commit is contained in:
Adam J. Stewart 2019-11-10 16:47:56 -06:00 committed by GitHub
parent 1ca91d728a
commit 60070759a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -61,3 +61,4 @@ def checksum(parser, args):
print()
print(version_lines)
print()

View File

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from __future__ import print_function
import os
import stat
import sys
@ -760,7 +762,7 @@ def get_checksums_for_versions(
*spack.cmd.elide_list(
["{0:{1}} {2}".format(str(v), max_len, url_dict[v])
for v in sorted_versions]))
tty.msg('')
print()
archives_to_fetch = tty.get_number(
"How many would you like to checksum?", default=1, abort='q')
@ -807,7 +809,7 @@ def get_checksums_for_versions(
])
num_hash = len(version_hashes)
tty.msg("Checksummed {0} version{1} of {2}".format(
tty.msg("Checksummed {0} version{1} of {2}:".format(
num_hash, '' if num_hash == 1 else 's', name))
return version_lines