9
9
from CIME .case .check_input_data import _download_if_in_repo
10
10
from CIME .utils import expect
11
11
from CIME .XML .inputdata import Inputdata
12
+ from CIME .Servers import has_svn , has_gftp , has_ftp , has_wget
12
13
13
14
###############################################################################
14
15
def download_file (input_root , the_file ):
@@ -19,16 +20,16 @@ def download_file(input_root, the_file):
19
20
while not success and protocol is not None :
20
21
protocol , address , user , passwd , _ , ic_filepath , _ = inputdata .get_next_server ()
21
22
if protocol is not None :
22
- if protocol == "svn" :
23
+ if protocol == "svn" and has_svn :
23
24
from CIME .Servers import SVN
24
25
server = SVN (address , user , passwd )
25
- elif protocol == "gftp" :
26
+ elif protocol == "gftp" and has_gftp :
26
27
from CIME .Servers import GridFTP
27
28
server = GridFTP (address , user , passwd )
28
- elif protocol == "ftp" :
29
+ elif protocol == "ftp" and has_ftp :
29
30
from CIME .Servers import FTP
30
31
server = FTP .ftp_login (address , user , passwd )
31
- elif protocol == "wget" :
32
+ elif protocol == "wget" and has_wget :
32
33
from CIME .Servers import WGET
33
34
server = WGET .wget_login (address , user , passwd )
34
35
else :
0 commit comments