MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / main

Function main

tools/get_chromedriver.py:262–295  ·  view source on GitHub ↗

The core structure of the app.

()

Source from the content-addressed store, hash-verified

260
261
262def main():
263 """The core structure of the app."""
264 try:
265 import requests # noqa: F401
266 except ImportError:
267 print(
268 "Error: The 'requests' library is required. "
269 "Please install it with 'pip install requests'"
270 )
271 sys.exit(1)
272
273 args = read_command_line()
274
275 if not os.path.isdir(args.directory):
276 print(
277 f'Error: The specified output directory "{args.directory}" '
278 'could not be accessed.'
279 )
280 sys.exit(1)
281
282 cft_platform = get_system_and_platform()
283 current_system = platform.system()
284 print(f'Detected OS: {current_system} | '
285 f'Target CfT Platform: {cft_platform}')
286
287 full_chrome_version = get_chrome_version()
288 print(f'Detected Chrome Version: {full_chrome_version}')
289
290 chromedriver_version, download_url = get_chromedriver_download_url(
291 full_chrome_version, cft_platform
292 )
293 print(f'Downloading chromedriver v{chromedriver_version}...')
294
295 download_and_extract(download_url, args.directory, cft_platform)
296
297
298if __name__ == '__main__':

Callers 1

Calls 6

get_system_and_platformFunction · 0.85
get_chrome_versionFunction · 0.85
download_and_extractFunction · 0.85
systemMethod · 0.80
read_command_lineFunction · 0.70

Tested by

no test coverage detected