def __call__(self, opts): import pkg_resources yt_provider = pkg_resources.get_provider("yt") path = os.path.dirname(yt_provider.module_path) vstring = _print_installation_information(path) if vstring is not None: print() print("This installation CAN be automatically updated.") update_git(path) else: _print_failed_source_update(opts.reinstall)
def __call__(self, opts): import pkg_resources yt_provider = pkg_resources.get_provider("yt") path = os.path.dirname(yt_provider.module_path) vstring = _print_installation_information(path) if vstring is not None: print("This installation CAN be automatically updated.") if opts.update_source: update_git(path) elif opts.update_source: _print_failed_source_update() if vstring is not None and opts.outputfile is not None: open(opts.outputfile, "w").write(vstring)