diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-09-15 20:13:07 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-09-15 20:13:07 -0400 |
commit | bea35b7685978804557aada44c819c536ab209b3 (patch) | |
tree | 070fb6db5efec8e0cd2e5d1d51d4c7f5e748085e /cloudinit/netinfo.py | |
parent | 668919511625f7b6a8922e4504e224e915f7be22 (diff) | |
parent | 6093b8b2733814b9265494c47f4268167c9491ab (diff) | |
download | vyos-cloud-init-bea35b7685978804557aada44c819c536ab209b3.tar.gz vyos-cloud-init-bea35b7685978804557aada44c819c536ab209b3.zip |
merge from trunk
Diffstat (limited to 'cloudinit/netinfo.py')
-rw-r--r-- | cloudinit/netinfo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/netinfo.py b/cloudinit/netinfo.py index 1bdca9f7..8d4df342 100644 --- a/cloudinit/netinfo.py +++ b/cloudinit/netinfo.py @@ -21,10 +21,13 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import cloudinit.util as util +from cloudinit.log import logging import re from prettytable import PrettyTable +LOG = logging.getLogger() + def netdev_info(empty=""): fields = ("hwaddr", "addr", "bcast", "mask") @@ -168,8 +171,9 @@ def route_pformat(): lines = [] try: routes = route_info() - except Exception: + except Exception as e: lines.append(util.center('Route info failed', '!', 80)) + util.logexc(LOG, "Route info failed: %s" % e) routes = None if routes is not None: fields = ['Route', 'Destination', 'Gateway', |