Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lscsoft
bilby
Commits
476af90c
Commit
476af90c
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Remove urllib dep. and make the exception more generic
parent
07856ea4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!162
Adds an explicit catch for cases where fetch_open_data fails
Pipeline
#29257
failed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/gw/utils.py
+1
-2
1 addition, 2 deletions
tupak/gw/utils.py
with
1 addition
and
2 deletions
tupak/gw/utils.py
+
1
−
2
View file @
476af90c
from
__future__
import
division
import
os
import
urllib2
import
numpy
as
np
...
...
@@ -343,7 +342,7 @@ def get_open_strain_data(
strain
=
TimeSeries
.
fetch_open_data
(
name
,
start_time
,
end_time
,
**
kwargs
)
logger
.
info
(
'
Saving cache of data to {}
'
.
format
(
filename
))
strain
.
write
(
filename
)
except
urllib2
.
URLError
as
e
:
except
Exception
as
e
:
logger
.
info
(
"
Unable to fetch open data, see debug for detailed info
"
)
logger
.
info
(
"
Call to gwpy.timeseries.TimeSeries.fetch_open_data returned {}
"
.
format
(
e
))
...
...
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