Re: minor bug?
- From:
- Zed A. Shaw
- Date:
- 2009-08-29 @ 15:51
On Sat, Aug 29, 2009 at 11:32:01AM -0400, paul wisehart wrote:
> Hi,
>
> Is the following a bug?:
>
> If you send email from the command line with just ints
> in the body you get an error.
Nope, that's just how shells screw things up. What's going on is when
you put "123456789" in the shell, it translates into an argument in
sys.argv of 123456789 because the shell peels off the "". It's not
Python, so the "" kind of has no meaning as an argument. Lamson's
argument parser then (correctly) interprets this as an integer and then
that blows up inside since an integer doesn't make sense as a email
body.
For now, just don't do that. I'll go throw a str() around the body
argument so it's always a string for the next release.
--
Zed A. Shaw
http://zedshaw.com/
Re: minor bug?
- From:
- paul wisehart
- Date:
- 2009-08-29 @ 16:02
Zed A. Shaw wrote:
> Nope, that's just how shells screw things up. What's going on is when
> you put "123456789" in the shell, it translates into an argument in
> sys.argv of 123456789 because the shell peels off the "".
Thanks, that makes sense.