def _clean_check(cmd, target):
 try:
  subprocess.check_call(cmd)
 except subprocess.CalledProcessError:
  if os.access(target, os.F_OK):
   os.unlink(target)
  raise

def _clean_check ( cmd , target ) : try : subprocess . check_call ( cmd ) except subprocess . CalledProcessError : if os . access ( target , os . F_OK ) : os . unlink ( target ) raise
run the command to download target .