[Moin-user] Where to catch FileTooLong error
Thomas Waldmann
tw at waldmann-edv.de
Tue Oct 14 12:26:37 EDT 2014
Hi Nikolaus,
> How about this patch?
>
> diff --git a/MoinMoin/Page.py b/MoinMoin/Page.py
> --- a/MoinMoin/Page.py
> +++ b/MoinMoin/Page.py
> @@ -217,6 +217,10 @@
> # never store empty pages, so this is detectable and also
> # safe when passed to a function expecting a string)
> return ""
> + elif er.errno == errno.ENAMETOOLONG:
> + # If the name is too long, the page can't exist on this
> + # system either.
> + return ""
> else:
> raise
>
> It fixed the issue for me, and applies cleanly against the 1.9 hg
> repository. I decided against an error message and instead opted to
> treat this like a file-not-found error (which, in some way it is).
> ./pytest also runs fine with the patched source.
OK, looks good. I fixed it in an equivalent way:
http://hg.moinmo.in/moin/1.9/rev/5e80523a1677
Thanks for the patch!
Cheers,
Thomas
More information about the Moin-user
mailing list