From 7fc6cd215fb5032db9637f26e146f7580393ddbb Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 27 May 2011 15:47:34 +0530 Subject: [PATCH] cleanups --- edgware/editor/cleanups.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edgware/editor/cleanups.py b/edgware/editor/cleanups.py index 9122089..945c6d8 100644 --- a/edgware/editor/cleanups.py +++ b/edgware/editor/cleanups.py @@ -1,10 +1,12 @@ from os.path import exists, join from editor.models import * from settings import MEDIA_ROOT - +import Image def checkImages(): for i in ImageBox.objects.all(): full_path = join(MEDIA_ROOT, i.original_print()) - if not exists(full_path): + try: + x = Image.open(full_path) + except: print full_path