Skip to content
Snippets Groups Projects
Commit 9046571e authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

[TASK] Changes logging for collisions.

... to be shorter.
parent a7b53c2f
Branches
No related tags found
No related merge requests found
...@@ -183,10 +183,10 @@ class Container(list): ...@@ -183,10 +183,10 @@ class Container(list):
'''Add a container collisions or break.''' '''Add a container collisions or break.'''
if self.collision_handling == COLLISION_HANDLING_BREAKALL or \ if self.collision_handling == COLLISION_HANDLING_BREAKALL or \
self.collision_handling == COLLISION_HANDLING_BREAKCONTAINER: self.collision_handling == COLLISION_HANDLING_BREAKCONTAINER:
msg = 'Collision in %s system detected! Aborting! %s found twice.' % (self, repr(record)) msg = 'Collision in %s system detected! Aborting! %s found twice.' % (self.name, repr(record))
raise DuplicatedSystemIdException(msg) raise DuplicatedSystemIdException(msg)
else: else:
msg = 'Collision in %s container detected! Ignoring collision. %s found twice and added to collision.' % (self, repr(record)) msg = 'Collision in %s container detected! Ignoring collision. %s found twice and added to collision.' % (self.name, repr(record))
logging.warn(msg) logging.warn(msg)
self.collisions.append(record) self.collisions.append(record)
...@@ -194,10 +194,10 @@ class Container(list): ...@@ -194,10 +194,10 @@ class Container(list):
'''Add a join collisions or break.''' '''Add a join collisions or break.'''
if self.collision_handling == COLLISION_HANDLING_BREAKALL or \ if self.collision_handling == COLLISION_HANDLING_BREAKALL or \
self.collision_handling == COLLISION_HANDLING_BREAKJOIN: self.collision_handling == COLLISION_HANDLING_BREAKJOIN:
msg = 'Collision in %s system detected! Aborting! %s found twice.' % (self, repr(record)) msg = 'Collision in %s system detected! Aborting! %s found twice.' % (self.name, repr(record))
raise DuplicatedJoinIdException(msg) raise DuplicatedJoinIdException(msg)
else: else:
msg = 'Collision in %s container detected! Ignoring collision. %s found twice and added to collision.' % (self, repr(record)) msg = 'Collision in %s container detected! Ignoring collision. %s found twice and added to collision.' % (self.name, repr(record))
logging.warn(msg) logging.warn(msg)
self.join_collisions.append(record) self.join_collisions.append(record)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment