diff --git a/PIL/Image.py b/PIL/Image.py index 0d97e9dc7..787e60270 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -539,7 +539,7 @@ class Image: try: self.fp.close() except Exception as msg: - if Image.DEBUG: + if DEBUG: print ("Error closing: %s" % msg) # Instead of simply setting to None, we're setting up a