Commit df73583f authored by Anael Beutot's avatar Anael Beutot
Browse files

hypervisor.lib: user count itertool instead of home made

parent 052c6f7f
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
"""Helpers for libvirt."""

import logging
from itertools import chain, imap
from itertools import chain, imap, count
from StringIO import StringIO
from xml.etree import cElementTree as et

@@ -195,14 +195,8 @@ class EventLoop(object):
        """
        self.loop = loop

        def counter():
            count = 0
            while True:
                yield count
                count += 1

        self.handle_id = counter()
        self.timer_id = counter()
        self.handle_id = count()
        self.timer_id = count()
        self.handles = dict()
        self.timers = dict()