Skip to content

Commit

Permalink
Adjustments for piggyback failures
Browse files Browse the repository at this point in the history
  • Loading branch information
1beb committed Feb 13, 2024
1 parent 3e6c7c8 commit 5e68d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Authors@R: c(
person("Brandon", "Bertelsen", , "[email protected]", role = c("aut", "cre")),
person("Santiago", "Olivella", , "[email protected]", role = "aut"),
person("Evan", "Rosenman", , "[email protected]", role = "aut"),
person("Alex", "Rossell Hayes", "[email protected]", role = "aut")),
person("Kosuke", "Imai", , "[email protected]", role = "aut")
)
Description: Predicts individual race/ethnicity using surname, first name,
Expand Down
5 changes: 3 additions & 2 deletions R/merge_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ merge_names <- function(voter.file, namesToUse, census.surname, table.surnames =
wru_data_preflight <- function() {
dest <- ifelse(getOption("wru_data_wd", default = FALSE), getwd(), tempdir())
tryCatch(
piggyback::pb_download(repo = "kosukeimai/wru", dest = dest),
error = function(e) message("There was an error retrieving data", e$message)
# Oddity of conditions for .token. Ignores token if is ""
piggyback::pb_download(repo = "kosukeimai/wru", dest = dest, .token = ""),
error = function(e) message("There was an error retrieving data: ", e$message)
)
}

0 comments on commit 5e68d24

Please sign in to comment.