[ocrfeeder] Revert usage of syntax not available on Python 2.5



commit d5b50f23fae0f6fa1262835bd1f9c91e0ff403cf
Author: Joaquim Rocha <jrocha igalia com>
Date:   Fri Mar 5 18:18:53 2010 +0100

    Revert usage of syntax not available on Python 2.5
    
    The keyword "as" was being used to get an exception instance.

 studio/widgetModeler.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/studio/widgetModeler.py b/studio/widgetModeler.py
index da111ce..27819f5 100644
--- a/studio/widgetModeler.py
+++ b/studio/widgetModeler.py
@@ -37,6 +37,7 @@ import math
 import os.path
 import pygtk
 import threading
+import sys
 pygtk.require('2.0')
 _ = gettext.gettext
 
@@ -383,9 +384,8 @@ class ImageReviewer_Controler:
             window_size = float(window_size)
         try:
             image_processor = ImageProcessor(image_reviewer.path_to_image, window_size)
-        except Exception as e:
-            message = '<b>%s</b>\n%s' % (_('Warning:'), str(e)) 
-            warning_dialog = WarningDialog(message)
+        except:
+            warning_dialog = WarningDialog(str(sys.exc_info()[1]))
             warning_dialog.run()
             warning_dialog.destroy()
             return



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]