From 2ed2cd54d47a5f6a3aca1c608dee5fa2fbc16a97 Mon Sep 17 00:00:00 2001 From: Yannick Marcon Date: Mon, 18 May 2020 12:02:47 +0200 Subject: [PATCH] Allow login without assignment --- R/datashield.login.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/datashield.login.R b/R/datashield.login.R index e7577e0..2944f45 100644 --- a/R/datashield.login.R +++ b/R/datashield.login.R @@ -178,7 +178,7 @@ datashield.login <- function(logins=NULL, assign=FALSE, variables=NULL, missings } rconnections <- c() for (i in 1:length(connections)) { - if(!excluded[i]) { + if (is.null(excluded) || !excluded[i]) { x <- list(connections[[i]]) names(x) <- stdnames[[i]] rconnections <- append(rconnections, x) @@ -218,7 +218,7 @@ datashield.login <- function(logins=NULL, assign=FALSE, variables=NULL, missings } resInfo <- dsGetInfo(res) if (resInfo$status == "FAILED") { - warning("Resource assignment of '", resources[i], "' failed for '", stdnames[i],"': ", res@error, call.=FALSE, immediate.=TRUE) + warning("Resource assignment of '", resources[i], "' failed for '", stdnames[i],"': ", resInfo$error, call.=FALSE, immediate.=TRUE) } } } @@ -260,7 +260,7 @@ datashield.login <- function(logins=NULL, assign=FALSE, variables=NULL, missings } resInfo <- dsGetInfo(res) if (resInfo$status == "FAILED") { - warning("Data assignment of '", tables[i], "' failed for '", stdnames[i],"': ", res@error, call.=FALSE, immediate.=TRUE) + warning("Data assignment of '", tables[i], "' failed for '", stdnames[i],"': ", resInfo$error, call.=FALSE, immediate.=TRUE) } } }