twister: Initialise unbound 'hardware' variable
hardware was referenced as return value, without being declared. When the program goes into the 'except' path, hardware is unbound, but returned, which throws an error: `UnboundLocalError`: local variable 'hardware' referenced before assignment Signed-off-by: Manoel Brunnen <manoel.brunnen@ithinx.io>
This commit is contained in:
parent
e8095b1a8b
commit
368b0e0d16
@ -452,6 +452,7 @@ class DeviceHandler(Handler):
|
||||
logger.error("{} timed out".format(script))
|
||||
|
||||
def get_hardware(self):
|
||||
hardware = None
|
||||
try:
|
||||
hardware = self.device_is_available(self.instance)
|
||||
while not hardware:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user