Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
14097e39
Commit
14097e39
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Suppress download status meter when routing I/O to a file.
parent
44003449
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/fetch_strategy.py
+13
-6
13 additions, 6 deletions
lib/spack/spack/fetch_strategy.py
with
13 additions
and
6 deletions
lib/spack/spack/fetch_strategy.py
+
13
−
6
View file @
14097e39
...
...
@@ -41,6 +41,7 @@
Archive a source directory, e.g. for creating a mirror.
"""
import
os
import
sys
import
re
import
shutil
from
functools
import
wraps
...
...
@@ -141,13 +142,19 @@ def fetch(self):
tty
.
msg
(
"
Trying to fetch from %s
"
%
self
.
url
)
curl_args
=
[
'
-O
'
,
# save file to disk
'
-f
'
,
# fail on >400 errors
'
-D
'
,
'
-
'
,
# print out HTML headers
'
-L
'
,
self
.
url
,]
if
sys
.
stdout
.
isatty
():
curl_args
.
append
(
'
-#
'
)
# status bar when using a tty
else
:
curl_args
.
append
(
'
-sS
'
)
# just errors when not.
# Run curl but grab the mime type from the http headers
headers
=
spack
.
curl
(
'
-#
'
,
# status bar
'
-O
'
,
# save file to disk
'
-f
'
,
# fail on >400 errors
'
-D
'
,
'
-
'
,
# print out HTML headers
'
-L
'
,
self
.
url
,
return_output
=
True
,
fail_on_error
=
False
)
headers
=
spack
.
curl
(
*
curl_args
,
return_output
=
True
,
fail_on_error
=
False
)
if
spack
.
curl
.
returncode
!=
0
:
# clean up archive on failure.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment