
from acoustid.script import run_script
import subprocess


def main(script, opts, args):
    subprocess.call(['psql'] + script.config.database.create_psql_args())

run_script(main)



from acoustid.script import run_script
import os


def main(script, opts, args):
    os.execlp('psql', 'psql', *script.config.database.create_psql_args())

run_script(main)


Use os.exelp to launch psql
Use os.exelp to launch psql

  
  from acoustid.script import run_script
- import subprocess
+ import os
  
  
  def main(script, opts, args):
-     subprocess.call(['psql'] + script.config.database.create_psql_args())
+     os.execlp('psql', 'psql', *script.config.database.create_psql_args())
  
  run_script(main)
  
  
Use os.exelp to launch psql
## Code Before:

from acoustid.script import run_script
import subprocess


def main(script, opts, args):
    subprocess.call(['psql'] + script.config.database.create_psql_args())

run_script(main)


## Instruction:
Use os.exelp to launch psql
## Code After:

from acoustid.script import run_script
import os


def main(script, opts, args):
    os.execlp('psql', 'psql', *script.config.database.create_psql_args())

run_script(main)

