Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 940fea0

Browse files
authored
Merge pull request #4 from ocefpaf/timeout
use timeout decorator in is_station
2 parents d52e988 + 3ce8ec5 commit 940fea0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ioos_tools/ioos.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from lxml import etree
2323
from owslib import fes
2424
from owslib.ows import ExceptionReport
25+
import timeout_decorator
2526

2627
from .tardis import cube2series
2728

@@ -565,6 +566,7 @@ def get_model_name(url):
565566
return mod_name
566567

567568

569+
@timeout_decorator.timeout(10, use_signals=False)
568570
def is_station(url):
569571
from netCDF4 import Dataset
570572
with Dataset(url) as nc:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ requests
1212
retrying
1313
scikit-learn
1414
scipy
15+
timeout-decorator

0 commit comments

Comments
 (0)