server/sqlutils.py
changeset 9321 212869484c65
parent 9267 24d9b86dfa54
child 9340 b1e933b0e850
equal deleted inserted replaced
9320:15bd24f9b9e0 9321:212869484c65
    39 
    39 
    40 lgc.USE_MX_DATETIME = False
    40 lgc.USE_MX_DATETIME = False
    41 SQL_PREFIX = 'cw_'
    41 SQL_PREFIX = 'cw_'
    42 
    42 
    43 def _run_command(cmd):
    43 def _run_command(cmd):
    44     """backup/restore command are string w/ lgc < 0.47, lists with earlier versions
       
    45     """
       
    46     if isinstance(cmd, basestring):
       
    47         print '->', cmd
       
    48         return subprocess.call(cmd, shell=True)
       
    49     print ' '.join(cmd)
    44     print ' '.join(cmd)
    50     return subprocess.call(cmd)
    45     return subprocess.call(cmd)
    51 
    46 
    52 
    47 
    53 def sqlexec(sqlstmts, cursor_or_execute, withpb=not os.environ.get('APYCOT_ROOT'),
    48 def sqlexec(sqlstmts, cursor_or_execute, withpb=not os.environ.get('APYCOT_ROOT'),