src/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()
This commit is contained in:
parent
dd04383bb8
commit
03ac286c80
@ -544,8 +544,7 @@ pub fn complete_remote_datastore_name(_arg: &str, param: &HashMap<String, String
|
|||||||
options,
|
options,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let mut rt = tokio::runtime::Runtime::new().unwrap();
|
let result = crate::tools::runtime::block_on(client.get("api2/json/admin/datastore", None))?;
|
||||||
let result = rt.block_on(client.get("api2/json/admin/datastore", None))?;
|
|
||||||
|
|
||||||
if let Some(data) = result["data"].as_array() {
|
if let Some(data) = result["data"].as_array() {
|
||||||
for item in data {
|
for item in data {
|
||||||
|
Loading…
Reference in New Issue
Block a user