Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3aa6cea8
Commit
3aa6cea8
authored
Oct 23, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #10077: Fix logging of site module errors at startup.
parent
ecdd0846
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
Misc/NEWS
Misc/NEWS
+2
-0
Python/pythonrun.c
Python/pythonrun.c
+4
-1
No files found.
Misc/NEWS
View file @
3aa6cea8
...
@@ -10,6 +10,8 @@ What's New in Python 3.1.3?
...
@@ -10,6 +10,8 @@ What's New in Python 3.1.3?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #10077: Fix logging of site module errors at startup.
- Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
- Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error
filenames encoded to the filesystem encoding with surrogateescape error
handler (to support undecodable bytes), instead of UTF-8 in strict mode.
handler (to support undecodable bytes), instead of UTF-8 in strict mode.
...
...
Python/pythonrun.c
View file @
3aa6cea8
...
@@ -721,14 +721,17 @@ initsite(void)
...
@@ -721,14 +721,17 @@ initsite(void)
if
(
f
==
NULL
||
f
==
Py_None
)
if
(
f
==
NULL
||
f
==
Py_None
)
return
;
return
;
if
(
Py_VerboseFlag
)
{
if
(
Py_VerboseFlag
)
{
PyObject
*
type
,
*
value
,
*
traceback
;
PyErr_Fetch
(
&
type
,
&
value
,
&
traceback
);
PyFile_WriteString
(
PyFile_WriteString
(
"'import site' failed; traceback:
\n
"
,
f
);
"'import site' failed; traceback:
\n
"
,
f
);
PyErr_Restore
(
type
,
value
,
traceback
);
PyErr_Print
();
PyErr_Print
();
}
}
else
{
else
{
PyErr_Clear
();
PyFile_WriteString
(
PyFile_WriteString
(
"'import site' failed; use -v for traceback
\n
"
,
f
);
"'import site' failed; use -v for traceback
\n
"
,
f
);
PyErr_Clear
();
}
}
}
}
else
{
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment