Commit 80f2bcb4 authored by Anael Beutot's avatar Anael Beutot
Browse files

jobs: use count itertool instead of home made

parent df73583f
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import sys
import traceback
from threading import Thread, Event
from StringIO import StringIO
from itertools import count

from cloudcontrol.node.exc import JobError
from cloudcontrol.node.utils import num_to_sig, close_fds
@@ -37,13 +38,7 @@ class JobManager(object):
        """
        :param main_loop: :class:`MainLoop` instance
        """
        def counter():
            i = 0
            while True:
                yield i
                i += 1

        self.job_id = counter()
        self.job_id = count()
        self.main = main_loop
        #: keep an index of all jobs
        self.jobs = {}