fix a case when "ip r" command fails

our network manager script isn't the beauty of the code base.
However, this fixes a case where it would crash the reader when an
external command fails.

fixes #1279.
Merge pull request #1280 from hwhw/master

fix a case when "ip r" command fails