migration.py
branchstable
changeset 6687 0b1f5c14646e
parent 6659 6205927e927a
child 6696 160ca95eb4cc
equal deleted inserted replaced
6686:070e3b23160d 6687:0b1f5c14646e
   356             from cubicweb.server.sqlutils import sqlexec
   356             from cubicweb.server.sqlutils import sqlexec
   357             sqlexec(open(migrscript).read(), self.session.system_sql)
   357             sqlexec(open(migrscript).read(), self.session.system_sql)
   358             self.commit()
   358             self.commit()
   359         else: # script_mode == 'doctest'
   359         else: # script_mode == 'doctest'
   360             import doctest
   360             import doctest
   361             doctest.testfile(migrscript, module_relative=False,
   361             return doctest.testfile(migrscript, module_relative=False,
   362                              optionflags=doctest.ELLIPSIS, globs=scriptlocals)
   362                                     optionflags=doctest.ELLIPSIS,
       
   363                                     encoding='utf-8',
       
   364                                     globs=scriptlocals)
   363         self._context_stack.pop()
   365         self._context_stack.pop()
   364 
   366 
   365     def cmd_option_renamed(self, oldname, newname):
   367     def cmd_option_renamed(self, oldname, newname):
   366         """a configuration option has been renamed"""
   368         """a configuration option has been renamed"""
   367         self._option_changes.append(('renamed', oldname, newname))
   369         self._option_changes.append(('renamed', oldname, newname))