def install_updates(skips=None, retries=5, categories=None):
 log.debug('categories to search for are: {0}'.format(str(categories)))
 quidditch = PyWinUpdater()
 quidditch.SetCategories(categories)
 quidditch.SetSkips(skips)
 (comment, passed, retries) = _search(quidditch, retries)
 if (not passed):
  return (comment, str(passed))
 (comment, passed, retries) = _download(quidditch, retries)
 if (not passed):
  return (comment, str(passed))
 (comment, passed, retries) = _install(quidditch, retries)
 if (not passed):
  return (comment, str(passed))
 try:
  comment = quidditch.GetInstallationResultsPretty()
 except Exception as exc:
  comment = 'Could not get results, but updates were installed. {0}'.format(exc)
 return 'Windows is up to date. \n{0}'.format(comment)

def install_updates ( skips = None , retries = 5 , categories = None ) : log . debug ( 'categories to search for are: {0}' . format ( str ( categories ) ) ) quidditch = PyWinUpdater ( ) quidditch . SetCategories ( categories ) quidditch . SetSkips ( skips ) ( comment , passed , retries ) = _search ( quidditch , retries ) if ( not passed ) : return ( comment , str ( passed ) ) ( comment , passed , retries ) = _download ( quidditch , retries ) if ( not passed ) : return ( comment , str ( passed ) ) ( comment , passed , retries ) = _install ( quidditch , retries ) if ( not passed ) : return ( comment , str ( passed ) ) try : comment = quidditch . GetInstallationResultsPretty ( ) except Exception as exc : comment = 'Could not get results, but updates were installed. {0}' . format ( exc ) return 'Windows is up to date. \n{0}' . format ( comment )
downloads and installs all available updates .