
class Machine:


    def __init__(self, connection):
        self.connection = connection
        self.__busy     = False


    def run_task(self, task):
        self.task   = task
        self.__busy = True
        self.task.start(self.connection)
        print("Machine: Assigned task %s." % task.executable)


    def is_busy(self):
        if self.__busy:
            self.__busy = False if self.task.done else self.__busy

        return self.__busy

274dfb12563bd49e39a1a5761014636ddec17e15
<mask token>

class Machine:
    <mask token>
    <mask token>
    <mask token>

class Machine:

    def __init__(self, connection):
        self.connection = connection
        self.__busy = False

    def run_task(self, task):
        self.task = task
        self.__busy = True
        self.task.start(self.connection)
        print('Machine: Assigned task %s.' % task.executable)
    <mask token>

class Machine:

    def __init__(self, connection):
        self.connection = connection
        self.__busy = False

    def run_task(self, task):
        self.task = task
        self.__busy = True
        self.task.start(self.connection)
        print('Machine: Assigned task %s.' % task.executable)

    def is_busy(self):
        if self.__busy:
            self.__busy = False if self.task.done else self.__busy
        return self.__busy


class Machine:


    def __init__(self, connection):
        self.connection = connection
        self.__busy     = False


    def run_task(self, task):
        self.task   = task
        self.__busy = True
        self.task.start(self.connection)
        print("Machine: Assigned task %s." % task.executable)


    def is_busy(self):
        if self.__busy:
            self.__busy = False if self.task.done else self.__busy

        return self.__busy
