summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-26 04:51:10 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-26 04:51:10 (GMT)
commited2b7397a0558414e1ec61c48bc889bb05e261ea (patch)
tree2516676def25ff2857db8fffebbe97fb23c1cb54 /Objects/exceptions.c
parent6ea45d33412d4ecb2862645d57137b7ea1223281 (diff)
downloadcpython-ed2b7397a0558414e1ec61c48bc889bb05e261ea.zip
cpython-ed2b7397a0558414e1ec61c48bc889bb05e261ea.tar.gz
cpython-ed2b7397a0558414e1ec61c48bc889bb05e261ea.tar.bz2
Use unicode and remove support for some uses of str8.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 7afaac0..e900243 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -833,10 +833,7 @@ SyntaxError_str(PySyntaxErrorObject *self)
/* XXX -- do all the additional formatting with filename and
lineno here */
- if (self->filename) {
- if (PyString_Check(self->filename))
- filename = PyString_AsString(self->filename);
- else if (PyUnicode_Check(self->filename))
+ if (self->filename && PyUnicode_Check(self->filename)) {
filename = PyUnicode_AsString(self->filename);
}
have_lineno = (self->lineno != NULL) && PyInt_CheckExact(self->lineno);