remove debug from option.py

This commit is contained in:
Emmanuel Garette 2018-09-30 11:26:33 +02:00
parent b494c70d9a
commit 2c5d376219
2 changed files with 1 additions and 12 deletions

View File

@ -25,7 +25,7 @@ from typing import Any, List, Callable, Optional
from .baseoption import OnlyOption, submulti, STATIC_TUPLE from .baseoption import OnlyOption, submulti, STATIC_TUPLE
from ..i18n import _ from ..i18n import _
from ..setting import log, undefined, debug, OptionBag from ..setting import log, undefined, OptionBag
from ..autolib import carry_out_calculation from ..autolib import carry_out_calculation
from ..error import (ConfigError, ValueWarning, PropertiesOptionError, from ..error import (ConfigError, ValueWarning, PropertiesOptionError,
display_list) display_list)
@ -300,12 +300,6 @@ class Option(OnlyOption):
check_error, check_error,
is_warnings_only) is_warnings_only)
except ValueError as err: except ValueError as err:
if debug: # pragma: no cover
log.debug('do_validation: value: {0}, index: {1}:'
' {2}'.format(val,
force_index,
err),
exc_info=True)
msg = _('"{0}" is an invalid {1} for "{2}"' msg = _('"{0}" is an invalid {1} for "{2}"'
'').format(val, '').format(val,
self._display_name, self._display_name,
@ -596,8 +590,6 @@ class Option(OnlyOption):
value, value,
func) func)
except PropertiesOptionError as err: except PropertiesOptionError as err:
if debug: # pragma: no cover
log.debug('propertyerror in launch_consistency: {0}'.format(err))
if transitive: if transitive:
err.set_orig_opt(option_bag.option) err.set_orig_opt(option_bag.option)
raise err raise err
@ -707,8 +699,6 @@ class Option(OnlyOption):
if opt_ not in equal: if opt_ not in equal:
equal.append(opt_) equal.append(opt_)
if equal: if equal:
if debug: # pragma: no cover
log.debug(_('_cons_not_equal: {} are not different').format(display_list(equal)))
if is_current: if is_current:
if warnings_only: if warnings_only:
msg = _('should be different from the value of "{}"') msg = _('should be different from the value of "{}"')

View File

@ -113,7 +113,6 @@ log = getLogger('tiramisu')
#FIXME #FIXME
#import logging #import logging
#logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) #logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
debug = False
static_set = frozenset() static_set = frozenset()