Fix it throws an exception when add an upgrade to a polytool.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>