aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/fileutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r--Python/fileutils.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c
index 95b64ed76fb..78603d40704 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -528,15 +528,7 @@ decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
break;
}
- if (converted == INCOMPLETE_CHARACTER) {
- /* Incomplete character. This should never happen,
- since we provide everything that we have -
- unless there is a bug in the C library, or I
- misunderstood how mbrtowc works. */
- goto decode_error;
- }
-
- if (converted == DECODE_ERROR) {
+ if (converted == DECODE_ERROR || converted == INCOMPLETE_CHARACTER) {
if (!surrogateescape) {
goto decode_error;
}