changeset 119:6f9c7d0b35d4

logger now ignores non-existing log modules (warns to prompt)
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 31 Jul 2008 17:53:21 +0000
parents 0c6fe081ca86
children e21b1a26fa5f
files engine/extensions/fifelog.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/engine/extensions/fifelog.py	Thu Jul 31 17:43:40 2008 +0000
+++ b/engine/extensions/fifelog.py	Thu Jul 31 17:53:21 2008 +0000
@@ -37,8 +37,11 @@
 				self.lm.addVisibleModule(k)
 		else:
 			for m in names:
-				self.lm.addVisibleModule(self.name2mod[m])
-		
+				try:
+					self.lm.addVisibleModule(self.name2mod[m])
+				except KeyError:
+					print 'Tried to enable non-existing log module "%s"' % m
+	
 	def removeVisibleModules(self, *names):
 		'''
 		Removes modules that are visible in logs. By default, all modules