This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年07月30日 22:35 by anton.barkovsky, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| webbrowser_args.patch | anton.barkovsky, 2012年07月30日 22:39 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg166930 - (view) | Author: Anton Barkovsky (anton.barkovsky) * | Date: 2012年07月30日 22:35 | |
Because of the way webbrowser.UnixBrowser.open generates command-line arguments the resulting list sometimes looks like this: ['chromium', '', 'http://www.example.org/'] This seems to work fine with chromium for me but as you can see: >>> subprocess.call(['ls', '', '-l']) ls: cannot access : No such file or directory 2 It's not a good idea to rely on that. I'm attaching a patch that filters out those empty arguments. |
|||
| msg167425 - (view) | Author: Anton Barkovsky (anton.barkovsky) * | Date: 2012年08月04日 17:55 | |
Added tests in #15557. |
|||
| msg168090 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年08月13日 12:29 | |
Better to fix producer of empty lines than filter those ones. Keep in mind: there are several places there args list generated, probably you fix not all error sources. |
|||
| msg169770 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年09月03日 16:15 | |
Given the logic of webbrowser, I think Anton's patch is correct. The null strings are produced by the somewhat twisted logic of UnixBrowser.open, and the problem doesn't apply to the other cases of argument list generation. (In those other cases, getting null strings would indicate a configuration error, which this case is not.) |
|||
| msg169776 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年09月03日 16:53 | |
New changeset 6768aa70c2d3 by R David Murray in branch '3.2': #15509: If %action substitution produces a null string, drop it. http://hg.python.org/cpython/rev/6768aa70c2d3 New changeset 323ca2f0e382 by R David Murray in branch 'default': Merge #15509: If %action substitution produces a null string, drop it. http://hg.python.org/cpython/rev/323ca2f0e382 New changeset 5da3b2df38b3 by R David Murray in branch 'default': #15557,#15447,#15509: webbrowser test suite added. http://hg.python.org/cpython/rev/5da3b2df38b3 |
|||
| msg169778 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年09月03日 16:54 | |
Thanks, Anton. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:33 | admin | set | github: 59714 |
| 2012年09月03日 16:54:46 | r.david.murray | set | status: open -> closed resolution: fixed messages: + msg169778 stage: test needed -> resolved |
| 2012年09月03日 16:53:26 | python-dev | set | nosy:
+ python-dev messages: + msg169776 |
| 2012年09月03日 16:16:33 | r.david.murray | set | title: webbrowser.open sometimes passes zero-length argument to the browser. -> UnixBrowser.open sometimes passes zero-length argument to the browser. |
| 2012年09月03日 16:15:43 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg169770 |
| 2012年08月13日 12:29:11 | asvetlov | set | nosy:
+ asvetlov messages: + msg168090 |
| 2012年08月09日 13:22:11 | asvetlov | link | issue15557 dependencies |
| 2012年08月06日 08:38:26 | tshepang | set | nosy:
+ tshepang |
| 2012年08月04日 17:55:06 | anton.barkovsky | set | messages: + msg167425 |
| 2012年07月30日 23:03:15 | ezio.melotti | set | nosy:
+ georg.brandl, ezio.melotti stage: test needed versions: + Python 2.7, Python 3.2 |
| 2012年07月30日 22:39:40 | anton.barkovsky | set | files: + webbrowser_args.patch |
| 2012年07月30日 22:39:23 | anton.barkovsky | set | files: - webbrowser_args.patch |
| 2012年07月30日 22:35:17 | anton.barkovsky | create | |