]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Merge pull request #498 from mckoss/feature/set-option
authorbdarnell <ben@bendarnell.com>
Mon, 7 May 2012 04:43:25 +0000 (21:43 -0700)
committerbdarnell <ben@bendarnell.com>
Mon, 7 May 2012 04:43:25 +0000 (21:43 -0700)
fix bug setting options programatically

1  2 
tornado/options.py

index e50dbfe23cff1ad9558f79ad178af6e63012ffeb,91839d55514ae6bc7c17406f86a9e440e3f1c6ea..4e23684f19f93357bb5faa6e424354fd50d59b63
@@@ -229,10 -225,11 +234,10 @@@ class _Option(object)
              datetime.datetime: self._parse_datetime,
              datetime.timedelta: self._parse_timedelta,
              bool: self._parse_bool,
-             str: self._parse_string,
+             basestring: self._parse_string,
          }.get(self.type, self.type)
          if self.multiple:
 -            if self._value is None:
 -                self._value = []
 +            self._value = []
              for part in value.split(","):
                  if self.type in (int, long):
                      # allow ranges of the form X:Y (inclusive at both ends)