Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/_imaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,6 @@ static const char *no_palette = "image has no palette";
static const char *readonly = "image is readonly";
/* static const char* no_content = "image has no content"; */

void *
ImagingError_OSError(void) {
PyErr_SetString(PyExc_OSError, "error when accessing file");
return NULL;
}

void *
ImagingError_MemoryError(void) {
return PyErr_NoMemory();
Expand All @@ -369,11 +363,6 @@ ImagingError_ValueError(const char *message) {
return NULL;
}

void
ImagingError_Clear(void) {
PyErr_Clear();
}

/* -------------------------------------------------------------------- */
/* HELPERS */
/* -------------------------------------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/File.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

fp = fopen(outfile, "wb");
if (!fp) {
(void)ImagingError_OSError();
PyErr_SetString(PyExc_OSError, "error when accessing file");

Check warning on line 57 in src/libImaging/File.c

View check run for this annotation

Codecov / codecov/patch

src/libImaging/File.c#L57

Added line #L57 was not covered by tests
return 0;
}

Expand Down
4 changes: 0 additions & 4 deletions src/libImaging/Imaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ ImagingSectionLeave(ImagingSectionCookie *cookie);
/* Exceptions */
/* ---------- */

extern void *
ImagingError_OSError(void);
extern void *
ImagingError_MemoryError(void);
extern void *
Expand All @@ -280,8 +278,6 @@ extern void *
ImagingError_Mismatch(void); /* maps to ValueError by default */
extern void *
ImagingError_ValueError(const char *message);
extern void
ImagingError_Clear(void);

/* Transform callbacks */
/* ------------------- */
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
return im;
}

ImagingError_Clear();
PyErr_Clear();

Check warning on line 648 in src/libImaging/Storage.c

View check run for this annotation

Codecov / codecov/patch

src/libImaging/Storage.c#L648

Added line #L648 was not covered by tests

// Try to allocate the image once more with smallest possible block size
MUTEX_LOCK(&ImagingDefaultArena.mutex);
Expand Down
Loading