public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][RM#4942] Fix chrome driver download utility for Ubuntu platform.
Date: Wed, 11 Mar 2020 15:37:58 +0530
Message-ID: <CAKKotZTwpUOyqOeoPQVZhyJooAFeiLB7RyJGTm+s0duJEy+=0Q@mail.gmail.com> (raw)

Hi,

PFA patch to fix the issue with chrome driver download utility due to which
it was failing on Ubuntu 18.04 with following error.

(venv3_pg) murtuza@ubuntu:~/projects/pgadmin4/tools (master)$ python
get_chromedriver.py /opt/google/chrome/chrome /tmp
The specified Chrome executable output an unexpected version string: Google
Chrome 80.0.3987.132 unknown
.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Attachments:

  [application/octet-stream] RM_4942.diff (768B, 3-RM_4942.diff)
  download | inline diff:
diff --git a/tools/get_chromedriver.py b/tools/get_chromedriver.py
index 48c6cc131..01bfff306 100644
--- a/tools/get_chromedriver.py
+++ b/tools/get_chromedriver.py
@@ -102,6 +102,11 @@ def get_chrome_version(args):
             print('The specified Chrome executable output an unexpected '
                   'version string: {}.'.format(version_str))
             sys.exit(1)
+        # On some linux distro `chrome--version` gives output like
+        # 'Google Chrome 80.0.3987.132 unknown\n'
+        # so we need to check and remove the unknown string from the version
+        if version_str.endswith("unknown\n"):
+            version_str = version_str.strip("unknown\n").strip()
 
         chrome_version = '.'.join(version_str.split()[-1].split('.')[:-1])
 


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][RM#4942] Fix chrome driver download utility for Ubuntu platform.
  In-Reply-To: <CAKKotZTwpUOyqOeoPQVZhyJooAFeiLB7RyJGTm+s0duJEy+=0Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox