def check_write(repo):
 try:
  repo_testfile = '.repo_test_file'
  repo_run_command(repo, ('touch %s' % repo_testfile)).stdout.strip()
  repo_run_command(repo, ('rm ' + repo_testfile))
 except error.CmdError:
  raise error.RepoWriteError(('Unable to write to ' + repo))

def check_write ( repo ) : try : repo_testfile = '.repo_test_file' repo_run_command ( repo , ( 'touch %s' % repo_testfile ) ) . stdout . strip ( ) repo_run_command ( repo , ( 'rm ' + repo_testfile ) ) except error . CmdError : raise error . RepoWriteError ( ( 'Unable to write to ' + repo ) )
checks that the remote repository directory is writable :type repo: string .