diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-16 14:31:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-16 14:31:34 -0400 |
commit | 752bd700e9da464006bfbd9877cc858dfad545ba (patch) | |
tree | 73625725d9a33ebeb1cb7db24a1b359a967eef06 | |
parent | 91b26994d40f7ea23f5bc7ef8e4e40e1af115e7a (diff) |
db-pick-mirror: filter out URLs with incomplete information
-rwxr-xr-x | db-pick-mirror | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db-pick-mirror b/db-pick-mirror index 6adcdaf..4d01b95 100755 --- a/db-pick-mirror +++ b/db-pick-mirror @@ -13,7 +13,8 @@ if data["version"] != 3 exit 1 end -urls = data["urls"] +# Filter out URLs with incomplete information +urls = data["urls"].select{|a| a.none?{|k,v|v.nil?}} rsync_urls = urls.select{|a| a["protocol"]==protocol} # By score ( (delay+speed)/completion ) |