def open_help(chapter=''):
 try:
  current_branch = get_current_branch()
 except git.exc.InvalidGitRepositoryError:
  current_branch = 'latest'
 else:
  if (current_branch in (DETACHED_HEAD, 'master')):
   current_branch = 'latest'
 help_url = (DOC_ROOT_FMT % current_branch)
 if chapter:
  help_url += DOC_ROUTER.get(chapter.lower(), '')
 webbrowser.open(help_url)

def open_help ( chapter = '' ) : try : current_branch = get_current_branch ( ) except git . exc . InvalidGitRepositoryError : current_branch = 'latest' else : if ( current_branch in ( DETACHED_HEAD , 'master' ) ) : current_branch = 'latest' help_url = ( DOC_ROOT_FMT % current_branch ) if chapter : help_url += DOC_ROUTER . get ( chapter . lower ( ) , '' ) webbrowser . open ( help_url )
opens the help in users preferred browser .