From 9def20e8d74475a5fe3e4844c13e988e03f4c363 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 26 Sep 2019 21:48:34 +0200 Subject: openvpn: T1691: interface is not always created - take care when setting alias --- src/conf_mode/interface-openvpn.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/interface-openvpn.py') diff --git a/src/conf_mode/interface-openvpn.py b/src/conf_mode/interface-openvpn.py index c91bc3900..57b07e187 100755 --- a/src/conf_mode/interface-openvpn.py +++ b/src/conf_mode/interface-openvpn.py @@ -916,7 +916,12 @@ def apply(openvpn): # sleep 250ms sleep(0.250) - Interface(openvpn['intf']).set_alias(openvpn['description']) + try: + # we need to catch the exception if the interface is not up due to + # reason stated above + Interface(openvpn['intf']).set_alias(openvpn['description']) + except: + pass return None -- cgit v1.2.3