From 028c134bfd10e80b2119d18777a0b679850adf32 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 11 Feb 2012 20:05:02 -0400 Subject: [PATCH] The OSError doesn't like unicode text, change it to plain Exception class (Sergei Glita) --- apps/sources/staging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sources/staging.py b/apps/sources/staging.py index ca8c92be9e..8f6608ed3e 100644 --- a/apps/sources/staging.py +++ b/apps/sources/staging.py @@ -41,7 +41,7 @@ def get_all_files(path): try: return sorted([os.path.normcase(f) for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))]) except OSError, exc: - raise OSError(ugettext(u'Unable get list of staging files: %s') % exc) + raise Exception(ugettext(u'Unable get list of staging files: %s') % exc) def _return_new_class(): @@ -136,7 +136,7 @@ class StagingFile(object): if exc.errno == errno.ENOENT: pass else: - raise OSError(ugettext(u'Unable to delete staging file: %s') % exc) + raise Exception(ugettext(u'Unable to delete staging file: %s') % exc) def get_valid_image(self, size=THUMBNAIL_SIZE, transformations=None): return convert(self.filepath, size=size, cleanup_files=False, transformations=transformations)