utils: Some changes to module functions.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
If there is guaranteed to be a value then you don't need to use get().  The only reason to use get() is to return None if the key doesn't exist.