def check_repo_or_die(path=None):
 guess_repo(path)
 top = repo()
 pst = stat_if_exists((top + '/objects/pack'))
 if (pst and stat.S_ISDIR(pst.st_mode)):
  return
 if (not pst):
  top_st = stat_if_exists(top)
  if (not top_st):
   log(('error: repository %r does not exist (see "bup help init")\n' % top))
   sys.exit(15)
 log(('error: %r is not a repository\n' % top))
 sys.exit(14)

def check_repo_or_die ( path = None ) : guess_repo ( path ) top = repo ( ) pst = stat_if_exists ( ( top + '/objects/pack' ) ) if ( pst and stat . S_ISDIR ( pst . st_mode ) ) : return if ( not pst ) : top_st = stat_if_exists ( top ) if ( not top_st ) : log ( ( 'error: repository %r does not exist (see "bup help init")\n' % top ) ) sys . exit ( 15 ) log ( ( 'error: %r is not a repository\n' % top ) ) sys . exit ( 14 )
check to see if a bup repository probably exists .