Skip to content
Snippets Groups Projects
Commit 3a8f02b7 authored by jkerdreu's avatar jkerdreu
Browse files

Cleanup

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2367 b32b6428-25c9-4566-ad07-03861ab6144f
parent e0168925
No related branches found
No related tags found
No related merge requests found
......@@ -287,8 +287,8 @@ class Engine(object):
t.func()
except CallbackError as e:
logger.error(e.description)
if (t.counter != -1):
t.counter = t.counter-1
if t.counter != -1:
t.counter-= 1
if t.counter == 0:
expire_list.append(t)
t.deadline = now + t.period
......@@ -419,4 +419,3 @@ class Timer(object):
self.period = period
self.counter = counter
self.deadline = time.time() + period
......@@ -70,11 +70,12 @@ def get_random_uuid():
def get_random_base_uuid():
return UUID.random_base()
def get_uuid(val):
if is_valid_uuid(val):
if type(val)==UUID:
return val
if type(val)==str:
return str_to_uuid(val)
return None
def str_to_uuid(val):
""" return an xAAL address for a given string"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment