[Python-Dev] [Python-checkins] r84559 - python/branches/py3k/Lib/subprocess.py (original) (raw)
Brian Curtin brian.curtin at gmail.com
Tue Sep 7 15:05:21 CEST 2010
- Previous message: [Python-Dev] [Python-checkins] r84559 - python/branches/py3k/Lib/subprocess.py
- Next message: [Python-Dev] [Python-checkins] r84559 - python/branches/py3k/Lib/subprocess.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Sep 7, 2010 at 07:34, Nick Coghlan <ncoghlan at gmail.com> wrote:
On Tue, Sep 7, 2010 at 2:29 AM, brian.curtin <python-checkins at python.org> wrote: > Author: brian.curtin > Date: Mon Sep 6 18:29:29 2010 > New Revision: 84559 > > Log: > Fix #8956. ValueError message was only mentioning one signal. > > Rather than list out the three signals (or more over time), the message was > made less specific but still descriptive. > > > > Modified: > python/branches/py3k/Lib/subprocess.py > > Modified: python/branches/py3k/Lib/subprocess.py > ============================================================================== > --- python/branches/py3k/Lib/subprocess.py (original) > +++ python/branches/py3k/Lib/subprocess.py Mon Sep 6 18:29:29 2010 > @@ -983,7 +983,7 @@ > elif sig == signal.CTRLBREAKEVENT: > os.kill(self.pid, signal.CTRLBREAKEVENT) > else: > - raise ValueError("Only SIGTERM is supported on Windows") > + raise ValueError("Unsupported signal")
Would it be worth including the signal number here, to at least give some hint as to exactly which signal was received? Cheers, Nick.
Sure, seems reasonable to me. Does """raise ValueError("Unsupported signal: {}".format(sig))""" look fine, or is there a more preferred format when displaying bad values in exception messages? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100907/76f260fe/attachment.html>
- Previous message: [Python-Dev] [Python-checkins] r84559 - python/branches/py3k/Lib/subprocess.py
- Next message: [Python-Dev] [Python-checkins] r84559 - python/branches/py3k/Lib/subprocess.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]