cubicweb/cwctl.py
changeset 11191 0c27c0da4094
parent 11189 3a39f145d530
child 11279 e4f11ef1face
equal deleted inserted replaced
11190:9b3a4ceff06a 11191:0c27c0da4094
    44 from logilab.common.shellutils import ASK
    44 from logilab.common.shellutils import ASK
    45 from logilab.common.configuration import merge_options
    45 from logilab.common.configuration import merge_options
    46 from logilab.common.deprecation import deprecated
    46 from logilab.common.deprecation import deprecated
    47 
    47 
    48 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage
    48 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage
    49 from cubicweb.utils import admincnx
       
    50 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS
    49 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS
    51 from cubicweb.toolsutils import Command, rm, create_dir, underline_title
    50 from cubicweb.toolsutils import Command, rm, create_dir, underline_title
    52 from cubicweb.__pkginfo__ import version
    51 from cubicweb.__pkginfo__ import version
    53 
    52 
    54 # don't check duplicated commands, it occurs when reloading site_cubicweb
    53 # don't check duplicated commands, it occurs when reloading site_cubicweb
   878             sources = ('system',)
   877             sources = ('system',)
   879         else:
   878         else:
   880             sources = ('all',)
   879             sources = ('all',)
   881         config.set_sources_mode(sources)
   880         config.set_sources_mode(sources)
   882         config.repairing = self.config.force
   881         config.repairing = self.config.force
   883         cnx = admincnx(appid)
       
   884         mih = config.migration_handler()
   882         mih = config.migration_handler()
   885         return mih, lambda: mih.shutdown()
   883         return mih, lambda: mih.shutdown()
   886 
   884 
   887     def run(self, args):
   885     def run(self, args):
   888         appuri = args.pop(0)
   886         appuri = args.pop(0)