Skip to content

Commit

Permalink
Tweak RblConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Guidotti committed Aug 21, 2024
1 parent 824d318 commit 8d925dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: RblDataLicense
Type: Package
Title: R Interface to 'Bloomberg Data License'
Version: 0.2.5
Version: 0.2.6
Authors@R: person(given = "Emanuele",
family = "Guidotti",
email = "emanuele.guidotti@unine.ch",
email = "emanuele.guidotti@usi.ch",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8961-6623"))
Description: R interface to access prices and market data with the
Expand All @@ -22,4 +22,4 @@ BugReports: https://github.com/eguidotti/RblDataLicense/issues
Depends: RCurl, xts, methods
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
5 changes: 2 additions & 3 deletions R/core.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @param host The connection host
#' @param port The connection port
#' @param protocol The connection protocol
#' @param verbose logical. Should R report extra information on progress?
#' @param verbose logical. Should print extra information on failure?
#'
#' @return logical. Is the connection succesful?
#'
Expand All @@ -31,8 +31,7 @@ RblConnect <- function(user, pw, host = 'sftp.bloomberg.com', port = '22', proto
url <- paste0(protocol, '://', user, ':', pw, '@', host, ':', port)

# test connection
if( is(try(getURL(url), silent = T), 'try-error') ){
if(verbose) cat('Authentication failure: check your configurations and whitelist the IP address in use. Contact Bloomberg support for help.')
if( is(try(getURL(url), silent = !verbose), 'try-error') ){
return(FALSE)
}

Expand Down
2 changes: 1 addition & 1 deletion man/RblConnect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d925dd

Please sign in to comment.