40 |
40 |
41 from logilab.common.clcommands import CommandLine |
41 from logilab.common.clcommands import CommandLine |
42 from logilab.common.shellutils import ASK |
42 from logilab.common.shellutils import ASK |
43 |
43 |
44 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage |
44 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage |
|
45 from cubicweb.utils import support_args |
45 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS |
46 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS |
46 from cubicweb.toolsutils import Command, rm, create_dir, underline_title |
47 from cubicweb.toolsutils import Command, rm, create_dir, underline_title |
47 from cubicweb.__pkginfo__ import version |
48 from cubicweb.__pkginfo__ import version |
48 |
49 |
49 CWCTL = CommandLine('cubicweb-ctl', 'The CubicWeb swiss-knife.', version=version) |
50 if support_args(CommandLine, 'check_duplicated_command'): |
|
51 # don't check duplicated commands, it occurs when reloading site_cubicweb |
|
52 CWCTL = CommandLine('cubicweb-ctl', 'The CubicWeb swiss-knife.', |
|
53 version=version, check_duplicated_command=False) |
|
54 else: |
|
55 CWCTL = CommandLine('cubicweb-ctl', 'The CubicWeb swiss-knife.', |
|
56 version=version) |
50 |
57 |
51 def wait_process_end(pid, maxtry=10, waittime=1): |
58 def wait_process_end(pid, maxtry=10, waittime=1): |
52 """wait for a process to actually die""" |
59 """wait for a process to actually die""" |
53 import signal |
60 import signal |
54 from time import sleep |
61 from time import sleep |