Changeset 4262

Show
Ignore:
Timestamp:
03/04/09 14:28:04 (4 years ago)
Author:
nopper
Message:

print replaced with log.debug() function of UmitLogging?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/UmitPlugins/umit/plugin/Parser.py

    r4261 r4262  
    2020 
    2121import re 
     22 
    2223from xml.dom.minidom import parse, parseString 
     24from umit.core.UmitLogging import log 
    2325 
    2426class Variable(object): 
     
    5961            raise Exception("Unable to set a valid type") 
    6062         
    61         print ">>> Variable()", self._name, self._value 
     63        log.debug(">>> Variable named '%s' allocate with value '%s'" % (self._name, self._value)) 
    6264 
    6365    @staticmethod 
     
    118120        """ 
    119121        if not Variable.setted(self._value): 
    120             print "check_validity(): Value not setted" 
     122            log.debug("check_validity(): value is not setted. Falling back to default value") 
    121123            self._value = self._def_val 
    122124        elif not isinstance(self._value, self.__class__.element_type): 
    123             print "check_validity(): Not same type" 
     125            log.debug("check_validity(): value is not of the type. Fallink back to default value") 
    124126            self._value = self._def_val 
    125127        elif not self.validate(): 
    126             print "check_validity(): Not valid!" 
     128            log.debug("check_validity(): value is not valid for validate(). Fallink back to default value") 
    127129            self._value = self._def_val 
    128130        else: 
    129             print "check_validity(): OK" 
    130  
    131         print "check_validity():", self._value 
     131            log.debug("check_validity(): value is OK") 
     132 
     133        log.debug("check_validity(): Ends out value is '%s'" % self._value) 
    132134 
    133135    def validate(self): 
     
    355357            Variable.__init__(self, value, name, def_value, desc, attrs, dict) 
    356358        except Exception, err: 
    357             print ">>> Ignoring exception.. we are List sir ;)" 
    358             print err 
     359            pass 
    359360 
    360361        for child in childs: