def guess_repo(path=None):
 global repodir
 if path:
  repodir = path
 if (not repodir):
  repodir = os.environ.get('BUP_DIR')
  if (not repodir):
   repodir = os.path.expanduser('~/.bup')

def guess_repo ( path = None ) : global repodir if path : repodir = path if ( not repodir ) : repodir = os . environ . get ( 'BUP_DIR' ) if ( not repodir ) : repodir = os . path . expanduser ( '~/.bup' )
set the path value in the global variable "repodir" .