Skip to content

Commit a1aef01

Browse files
committed
Bump version
1 parent cf0d04f commit a1aef01

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

CRAN-RELEASE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This package was submitted to CRAN on 2020-11-15.
2-
Once it is accepted, delete this file and tag the release (commit 9a9558a).
1+
This package was submitted to CRAN on 2020-11-23.
2+
Once it is accepted, delete this file and tag the release (commit cf0d04f).

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: UCSCXenaTools
22
Title: Download and Explore Datasets from UCSC Xena Data Hubs
3-
Version: 1.3.5
3+
Version: 1.3.6
44
Authors@R: c(person("Shixiang", "Wang", email = "[email protected]", role = c("aut", "cre"),
55
comment = c(ORCID = "0000-0001-9855-7357")),
66
person("Xue-Song", "Liu", role = "aut", comment = c(ORCID = "0000-0002-7736-0077")),

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# UCSCXenaTools 1.3.6
2+
3+
- Fixed a bug about try times for data download.
4+
- Make sure a message instead of an error will be returned if download process failed.
5+
16
# UCSCXenaTools 1.3.5
27

38
- Added TDI data Hub containing 9 new datasets.

R/XenaDownload.R

+10-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,15 @@ XenaDownload <- function(xquery,
9292
x[4] <- gsub(pattern = "\\.gz$", "", x[4])
9393
x[5] <- gsub(pattern = "\\.gz$", "", x[5])
9494
message("Try downloading file", x[4], "...")
95-
download.file2(x[3], destfile = x[5], max_try = max_try, ...)
95+
tryCatch(
96+
{
97+
download.file2(x[3], destfile = x[5], max_try = max_try, ...)
98+
},
99+
error = function(e) {
100+
message("Your network is bad (try again) or the data source is invalid (report to the developer).")
101+
invisible(NULL)
102+
}
103+
)
96104
}
97105
)
98106
}) # nocov end
@@ -121,7 +129,7 @@ download.file2 <- function(url, destfile,
121129
if (max_try == 1) {
122130
stop("Tried 3 times but failed, please check your internet connection!")
123131
} else {
124-
download.file(url, destfile, max_try = max_try - 1L, ...)
132+
download.file2(url, destfile, max_try = max_try - 1L, ...)
125133
}
126134
}
127135
)

0 commit comments

Comments
 (0)