##// END OF EJS Templates
config: use the new '_unset' value for 'configlist'...
marmoute -
r32963:88b3a38d default
parent child Browse files
Show More
@@ -631,7 +631,7 b' class ui(object):'
631 raise error.ConfigError(_("%s.%s is not a byte quantity ('%s')")
631 raise error.ConfigError(_("%s.%s is not a byte quantity ('%s')")
632 % (section, name, value))
632 % (section, name, value))
633
633
634 def configlist(self, section, name, default=None, untrusted=False):
634 def configlist(self, section, name, default=_unset, untrusted=False):
635 """parse a configuration element as a list of comma/space separated
635 """parse a configuration element as a list of comma/space separated
636 strings
636 strings
637
637
@@ -641,10 +641,13 b' class ui(object):'
641 ['this', 'is', 'a small', 'test']
641 ['this', 'is', 'a small', 'test']
642 """
642 """
643 # default is not always a list
643 # default is not always a list
644 if isinstance(default, bytes):
644 v = self.configwith(config.parselist, section, name, default,
645 default = config.parselist(default)
646 return self.configwith(config.parselist, section, name, default or [],
647 'list', untrusted)
645 'list', untrusted)
646 if isinstance(v, bytes):
647 return config.parselist(v)
648 elif v is None:
649 return []
650 return v
648
651
649 def configdate(self, section, name, default=None, untrusted=False):
652 def configdate(self, section, name, default=None, untrusted=False):
650 """parse a configuration element as a tuple of ints
653 """parse a configuration element as a tuple of ints
General Comments 0
You need to be logged in to leave comments. Login now