1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Add a few more trt/except blocks to warn and proceed

Ticket:
Reviewed By:
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
This commit is contained in:
Roopa Prabhu
2014-12-10 21:30:39 -08:00
parent 724a5011b9
commit 3980661f16

View File

@@ -138,7 +138,11 @@ class ifaceScheduler():
if (not ifaceobjs[0].addr_method or
(ifaceobjs[0].addr_method and
ifaceobjs[0].addr_method != 'manual')):
handler(ifupdownobj, ifaceobjs[0])
try:
handler(ifupdownobj, ifaceobjs[0])
except Exception, e:
ifupdownobj.logger.warn('%s' %str(e))
pass
for ifaceobj in ifaceobjs:
cls.run_iface_op(ifupdownobj, ifaceobj, op,
cenv=ifupdownobj.generate_running_env(ifaceobj, op)
@@ -146,8 +150,12 @@ class ifaceScheduler():
'0') == '1' else None)
posthookfunc = ifupdownobj.sched_hooks.get('posthook')
if posthookfunc:
[posthookfunc(ifupdownobj, ifaceobj, ops[0])
for ifaceobj in ifaceobjs]
try:
[posthookfunc(ifupdownobj, ifaceobj, ops[0])
for ifaceobj in ifaceobjs]
except Exception, e:
ifupdownobj.logger.warn('%s' %str(e))
pass
@classmethod
def _check_upperifaces(cls, ifupdownobj, ifaceobj, ops, parent,