Code review comment for lp:~rogpeppe/gozk/clean-up-interface

Revision history for this message
Roger Peppe (rogpeppe) wrote :

On 23 September 2011 19:41, Gustavo Niemeyer <email address hidden> wrote:
>> the docs say that the only error that glob can return is if the
>> pattern is malformed. those patterns are evidently not.
>
> Until someone changes them by mistake and they become malformed,
> and rather than being warned about that we get crazy behavior.
>
> A panic is fine in that case, but please do not leave errors unchecked.

i will do this since you ask. but i really think this is unnecessary.
the worst thing that will happen if the pattern is bad is that we'll
get no files.
this will also happen if the file name is misspelled, a much more likely
case (and one incidentally that i think might apply currently - i can't
test it), and one which the error check won't catch. it seems ok to me
that they're
both debugged in the same way.

[the only time a pattern can be bad is if ends in a backslash
or it has a malformed character class. the former is easy to see
and we're unlikely to add a character class match here.]

i've pushed a new version. i'll leave the Server changes for a separate
merge, as suggested.

« Back to merge proposal