Skip to content
This repository

Quotes not working properly #27

Closed
jiaaro opened this Issue · 7 comments

5 participants

James Robert Krzysztof Klinikowski ibeex Von Welch Kenneth Reitz
James Robert

I tried the following in a script and got an error

>>> r = envoy.run("mail --subject='MPAdmin Notice: Server out of RAM' 'my@email.address'", data="\nTest Message\n")
>>> r.std_err 
"Cannot parse address `Notice:' (while expanding `Notice:'): Format of RFC822 object is bad\n"
>>> r.command 
['mail',
 '--subject=MPAdmin',
 'Notice:',
 'Server',
 'out',
 'of',
 'RAM',
 'my@email.address']

Had to double escape the subject line like so:

envoy.run("mail --subject='MPAdmin\ Notice:\ Server\ out\ of\ RAM' 'my@email.address'", data="Test Message\n")

As an additional little tidbit, it seems the data kwarg requires a trailing newline to work properly, that's not such a big deal though. It might be specific to mail and not related to envoy.

Thanks for the great lib :)

Krzysztof Klinikowski

Same issue here :)

Krzysztof Klinikowski

Ok, it seems to be fixed in version from git. Could anyone update easy_install packages? :)

ibeex

can maintainer on pypi update package?

ibeex

commit https://github.com/kennethreitz/envoy/commit/e8e4c70a90032b1b0a7d5a832090fafd0c97107b#envoy/core.py breaks this again ?

if test is changed to
sentinel = '#quoted_args' * 3
it wont raise error with posix=True, but it will still fail !?

ibeex

adding splitter.commenters = '' fix test with sentinel = '#quoted_args' * 3, but Issue #29 is still there shlex should not split if | is in quotes.

ibeex ibeex referenced this issue from a commit in ibeex/envoy
ibeex ibeex fix regarding issue #27
Added pycharm to gitignore
Added 2 more tests regarding quoted characters one with # in quote and
other with | in quote
Fix for issue #27
 first split by space then recreate list splited by | sinece shlex
without posix=Trou would split if | was in quote and added commenters =
'' include # in string
cd53254
Von Welch
von commented

Just a note that this problem still exists with the latest envoy from 'pip install envoy'

Kenneth Reitz
Owner

This project is in a bit of a crisis state — it's really useful, and I use it on a daily basis. However, I wrote it in a few afternoons several years ago and haven't touched it since. In order to get the project into a stable state I'm closing all issues and pull requests

Don't take this as aggressive — it's just necessary for the project to make any progress any time soon (it's pretty clear the project is effectively unmaintained at the moment). Great things to come! Please watch the GitHub logs and feel free to re-open this discussion soon. I just need to really it into a good state first.

:sparkles::heart::sparkles:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.