126 OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, content)
127 OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, content)
128 except Exception as e:
129 raise EndpointError(None, message=str(e))130
131 return True
130 :type iface: string
131 """
132
133 ifconfig_down(iface)134
135 def get_hostname(self):
136 """
120 :type iface: string
121 """
122
123 ifconfig_up(iface)124
125 def down(self, iface):
126 """
109
110 return {
111 'address': ifconfig_get_ip(iface),
112 'up': ifconfig_get_up(iface),113 }
114
115 def up(self, iface):
108 """
109
110 return {
111 'address': ifconfig_get_ip(iface),112 'up': ifconfig_get_up(iface),
113 }
114
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')