import os
import subprocess

def handle_cd_command(arg):
    """Handles a `cd` shell command by calling python's os.chdir."""
    CD_CMD = 'cd'
    directory = ''
    error = False

    tokens = arg.split(CD_CMD + ' ')
    directory = tokens[-1]

    try:
        os.chdir(directory)
        output = subprocess.check_output('pwd', stderr=subprocess.STDOUT, shell=True)
    except OSError as e:
        return False, e.strerror

import os
import subprocess

def handle_cd_command(arg):
    """Handles a `cd` shell command by calling python's os.chdir."""
    CD_CMD = 'cd'
    directory = ''
    error = False

    tokens = arg.split(CD_CMD + ' ')
    directory = tokens[-1]

    try:
        os.chdir(directory)
        subprocess.call(['pwd'])
        return True, None
    except OSError as e:
        return False, e.strerror

Stop using 'check_output' method and start using 'call' method in handler_cd_command
Stop using 'check_output' method and start using 'call' method in handler_cd_command

  import os
  import subprocess
  
  def handle_cd_command(arg):
      """Handles a `cd` shell command by calling python's os.chdir."""
      CD_CMD = 'cd'
      directory = ''
      error = False
  
      tokens = arg.split(CD_CMD + ' ')
      directory = tokens[-1]
  
      try:
          os.chdir(directory)
-         output = subprocess.check_output('pwd', stderr=subprocess.STDOUT, shell=True)
+         subprocess.call(['pwd'])
+         return True, None
      except OSError as e:
          return False, e.strerror
  
Stop using 'check_output' method and start using 'call' method in handler_cd_command
## Code Before:
import os
import subprocess

def handle_cd_command(arg):
    """Handles a `cd` shell command by calling python's os.chdir."""
    CD_CMD = 'cd'
    directory = ''
    error = False

    tokens = arg.split(CD_CMD + ' ')
    directory = tokens[-1]

    try:
        os.chdir(directory)
        output = subprocess.check_output('pwd', stderr=subprocess.STDOUT, shell=True)
    except OSError as e:
        return False, e.strerror

## Instruction:
Stop using 'check_output' method and start using 'call' method in handler_cd_command
## Code After:
import os
import subprocess

def handle_cd_command(arg):
    """Handles a `cd` shell command by calling python's os.chdir."""
    CD_CMD = 'cd'
    directory = ''
    error = False

    tokens = arg.split(CD_CMD + ' ')
    directory = tokens[-1]

    try:
        os.chdir(directory)
        subprocess.call(['pwd'])
        return True, None
    except OSError as e:
        return False, e.strerror
