Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Don't panic on uknown git commit hash (#4231)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar committed Feb 3, 2017
1 parent c36655d commit 2cfb951
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipc-common-types/src/types/version_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
//! Types used in the public API

use std::fmt;
use std::str::FromStr;
use semver::{Version};
use util::{H160};
use util::{H160, FixedHash};
use util::misc::raw_package_info;
use release_track::ReleaseTrack;

Expand Down Expand Up @@ -47,7 +48,7 @@ impl VersionInfo {
VersionInfo {
track: raw.0.into(),
version: { let mut v = Version::parse(raw.1).expect("Environment variables are known to be valid; qed"); v.build = vec![]; v.pre = vec![]; v },
hash: raw.2.into(),
hash: H160::from_str(raw.2).unwrap_or_else(|_| H160::zero()),
}
}

Expand Down

0 comments on commit 2cfb951

Please sign in to comment.