Commits

Jacob Söndergaard  committed 39a3d39

improved yaml parsing: avoid trying to parse strings containing alphabetic characters as numbers

  • Participants
  • Parent commits 5625acb

Comments (0)

Files changed (1)

File beanstalktc/beanstalktc.py

         else:
             # it is a dict
             conv = lambda v: ((float(v) if '.' in v else int(v))
-                if v[0].isdigit() or v[-1].isdigit() else v)
+                if v.replace('.', '').isdigit() else v)
             resp.body = dict((k, conv(v.strip())) for k, v in
                     (s.split(':') for s in spl))
         self._do_callback(cb, resp)