Commit 35841794 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Fix a 'FileNotFoundError' is not defined error

This exception does not exist in python 2.x
parent bd3103bc
......@@ -23,6 +23,7 @@ import signal
import tempfile
import os
import time
import errno
from string import lowercase, uppercase, digits
from image_creator.util import FatalError, get_kvm_binary
......@@ -168,8 +169,9 @@ class VM(object):
if self.serial is not None:
except FileNotFoundError:
except OSError as e:
if errno.errorcode[e.errno] != 'ENOENT': # File not found
def wait_on_serial(self, timeout):
"""Wait until the random token appears on the VM's serial port"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment