Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' into dev

  • Loading branch information...
commit 176b35498754575120c28c5ac6540950f0454ae8 2 parents 3b1e0c7 + f3c3f77
authored November 25, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  data_importer/base.py
6  data_importer/base.py
@@ -82,7 +82,7 @@ def _get_reader(self,reader=None,reader_kwargs={}):
82 82
             if parts[-1].lower() not in READERS_X_EXTENSIONS:
83 83
                 raise ValueError,_(u"Doesn't exist a relation between file extension and a reader. You should specify a reader from data_importer.readers or crete your own.")
84 84
             return READERS_X_EXTENSIONS[parts[-1].lower()](self.import_file,**reader_kwargs)
85  
-        except Exception, err:
  85
+        except Exception:
86 86
             exc_info = sys.exc_info()
87 87
             self.logger.debug("\n".join(traceback.format_exception(*exc_info)))
88 88
             self.logger.critical(_("Something goes wrong when try to read the file!"))
@@ -247,10 +247,10 @@ def save_gen(self):
247 247
                 except NotImplementedError:
248 248
                     pass
249 249
                 return rows
250  
-        except Exception, err:
  250
+        except Exception as err:
251 251
             exc_info = sys.exc_info()
252 252
             self.logger.debug(self.logger.debug("\n".join(traceback.format_exception(*exc_info))))
253  
-            self.logger.critical(_("Process stoped with error %s."),err)
  253
+            self.logger.critical(_("Process stoped with error %s: %s."),err.__class__.__name__, err)
254 254
 
255 255
 
256 256
     def save(self,i,row):

0 notes on commit 176b354

Please sign in to comment.
Something went wrong with that request. Please try again.