handle keys deserialization errors, fixes #1592 (#1701)

* handle keys deserialization errors, fixes #1592

* warning on unsuccesfull geth accounts import
This commit is contained in:
Marek Kotewicz
2016-07-28 20:26:07 +02:00
committed by Gav Wood
parent 3199576416
commit 80a7e4b964
3 changed files with 13 additions and 9 deletions

View File

@@ -295,8 +295,9 @@ fn prepare_account_provider(dirs: &Directories, cfg: AccountsConfig) -> Result<A
let from = GethDirectory::open(t);
let to = DiskDirectory::create(dirs.keys.clone()).unwrap();
// ignore error, cause geth may not exist
let _ = import_accounts(&from, &to);
if let Err(err) = import_accounts(&from, &to) {
warn!("Import geth accounts failed. {}", err);
}
}
let dir = Box::new(DiskDirectory::create(dirs.keys.clone()).unwrap());