Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into dev
  • Loading branch information
Felipe Prenholato committed Nov 26, 2012
2 parents 3b1e0c7 + f3c3f77 commit 176b354
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_importer/base.py
Expand Up @@ -82,7 +82,7 @@ def _get_reader(self,reader=None,reader_kwargs={}):
if parts[-1].lower() not in READERS_X_EXTENSIONS:
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.")
return READERS_X_EXTENSIONS[parts[-1].lower()](self.import_file,**reader_kwargs)
except Exception, err:
except Exception:
exc_info = sys.exc_info()
self.logger.debug("\n".join(traceback.format_exception(*exc_info)))
self.logger.critical(_("Something goes wrong when try to read the file!"))
Expand Down Expand Up @@ -247,10 +247,10 @@ def save_gen(self):
except NotImplementedError:
pass
return rows
except Exception, err:
except Exception as err:
exc_info = sys.exc_info()
self.logger.debug(self.logger.debug("\n".join(traceback.format_exception(*exc_info))))
self.logger.critical(_("Process stoped with error %s."),err)
self.logger.critical(_("Process stoped with error %s: %s."),err.__class__.__name__, err)


def save(self,i,row):
Expand Down

0 comments on commit 176b354

Please sign in to comment.