common/i18n.py
changeset 3230 1d25e928c299
parent 3156 cd56d5c379cb
parent 3202 241ae91e9ab7
child 3293 69c0ba095536
equal deleted inserted replaced
3199:fc63b80ec979 3230:1d25e928c299
    42 
    42 
    43 def execute(cmd):
    43 def execute(cmd):
    44     """display the command, execute it and raise an Exception if returned
    44     """display the command, execute it and raise an Exception if returned
    45     status != 0
    45     status != 0
    46     """
    46     """
       
    47     from subprocess import call
    47     print cmd.replace(os.getcwd() + os.sep, '')
    48     print cmd.replace(os.getcwd() + os.sep, '')
    48     if sys.platform == 'win32':
    49     status = call(cmd, shell=True)
    49         from subprocess import call
       
    50     else:
       
    51         call = os.system
       
    52     status = call(cmd)
       
    53     if status != 0:
    50     if status != 0:
    54         raise Exception('status = %s' % status)
    51         raise Exception('status = %s' % status)
    55 
    52 
    56 
    53 
    57 def available_catalogs(i18ndir=None):
    54 def available_catalogs(i18ndir=None):