[tahoe-lafs-trac-stream] [tahoe-lafs] #1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles with the regex it uses)
tahoe-lafs
trac at tahoe-lafs.org
Wed Sep 19 03:31:40 UTC 2012
#1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles
with the regex it uses)
-------------------------+-------------------------------------------------
Reporter: | Owner: davidsarah
davidsarah | Status: new
Type: defect | Milestone: soon
Priority: normal | Version: 1.9.2
Component: code | Keywords: reserved_space storage error
Resolution: | usability
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by davidsarah):
Replying to [ticket:1812 davidsarah]:
> The regex is {{{r"^(\d+)([kKmMgG]?[iB]?[bB]?)$"}}}, which also allows
strings ending in {{{"BB"}}} or {{{"Bb"}}}; I don't think that allowing
the repeated B was intentional.
... especially because {{{parse_abbreviated_size}}} will then fail with a
{{{KeyError}}} (not a {{{ValueError}}} as it should) because only one
{{{B}}} is stripped off, not both.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1812#comment:1>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list