コード例 #1
0
ファイル: importer.py プロジェクト: pombredanne/trachacks
 def _do_preview(self, uploadedfile, sheet, req):
     filereader = get_reader(uploadedfile, sheet)
     try:
         return self._process(filereader, get_reporter_id(req),
                              PreviewProcessor(self.env, req))
     finally:
         filereader.close()
コード例 #2
0
ファイル: importer.py プロジェクト: nyuhuhuu/trachacks
 def _do_import(self, uploadedfile, sheet, req, uploadedfilename, tickettime):
     filereader = get_reader(uploadedfile, sheet)
     try:
         try:
             return self._process(filereader, get_reporter_id(req), ImportProcessor(self.env, req, uploadedfilename, tickettime))
         finally:
             filereader.close()
     except:
         # Unlock the database. This is not really tested, but seems reasonable. TODO: test or verify this
         self.env.get_db_cnx().rollback()
         raise
コード例 #3
0
 def _do_import(self, uploadedfile, sheet, req, uploadedfilename, tickettime, encoding=None):
     filereader = get_reader(uploadedfile, sheet, self._datetime_format(), encoding=encoding)
     try:
         try:
             return self._process(filereader, get_reporter_id(req), ImportProcessor(self.env, req, uploadedfilename, tickettime))
         finally:
             filereader.close()
     except:
         # Unlock the database. This is not really tested, but seems reasonable. TODO: test or verify this
         self.env.get_db_cnx().rollback()
         raise
コード例 #4
0
ファイル: importer.py プロジェクト: nyuhuhuu/trachacks
 def _do_preview(self, uploadedfile, sheet, req):
     filereader = get_reader(uploadedfile, sheet)
     try:
         return self._process(filereader, get_reporter_id(req), PreviewProcessor(self.env, req))
     finally:
         filereader.close()
コード例 #5
0
 def _do_preview(self, uploadedfile, sheet, req, encoding=None):
     filereader = get_reader(uploadedfile, sheet, self._datetime_format(), encoding=encoding)
     try:
         return self._process(filereader, get_reporter_id(req), PreviewProcessor(self.env, req))
     finally:
         filereader.close()