change None to undefined when it's needed

This commit is contained in:
2014-04-12 21:55:22 +02:00
parent 3ab0688c46
commit aa0734591d
4 changed files with 18 additions and 17 deletions

View File

@ -24,7 +24,7 @@ from types import FunctionType
import warnings
from tiramisu.i18n import _
from tiramisu.setting import log
from tiramisu.setting import log, undefined
from tiramisu.autolib import carry_out_calculation
from tiramisu.error import ConfigError, ValueWarning
@ -164,14 +164,14 @@ class BaseOption(object):
"""
self._impl_informations[key] = value
def impl_get_information(self, key, default=None):
def impl_get_information(self, key, default=undefined):
"""retrieves one information's item
:param key: the item string (ex: "help")
"""
if key in self._impl_informations:
return self._impl_informations[key]
elif default is not None:
elif default is not undefined:
return default
else:
raise ValueError(_("information's item not found: {0}").format(