cwctl.py
branchtls-sprint
changeset 1342 4273e44852cb
parent 1263 01152fffd593
child 1446 e951a860eeaf
equal deleted inserted replaced
1341:9502d02630bf 1342:4273e44852cb
     2 
     2 
     3 CubicWeb main applications controller. 
     3 CubicWeb main applications controller. 
     4 %s"""
     4 %s"""
     5 
     5 
     6 import sys
     6 import sys
     7 from os import remove, listdir, system, kill, getpgid
     7 from os import remove, listdir, system, kill, getpgid, pathsep
     8 from os.path import exists, join, isfile, isdir
     8 from os.path import exists, join, isfile, isdir
     9 
     9 
    10 from logilab.common.clcommands import register_commands, pop_arg
    10 from logilab.common.clcommands import register_commands, pop_arg
    11 
    11 
    12 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage
    12 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage
   174                 if not line:
   174                 if not line:
   175                     continue
   175                     continue
   176                 print '   ', line
   176                 print '   ', line
   177         print 
   177         print 
   178         try:
   178         try:
   179             cubesdir = cwcfg.cubes_dir()
   179             cubesdir = pathsep.join(cwcfg.cubes_search_path())
   180             namesize = max(len(x) for x in cwcfg.available_cubes())
   180             namesize = max(len(x) for x in cwcfg.available_cubes())
   181         except ConfigurationError, ex:
   181         except ConfigurationError, ex:
   182             print 'No cubes available:', ex
   182             print 'No cubes available:', ex
   183         except ValueError:
   183         except ValueError:
   184             print 'No cubes available in %s' % cubesdir
   184             print 'No cubes available in %s' % cubesdir