Skip to content

Commit

Permalink
Fix #11 and #12: Precede self. to driver_directory variable and separ…
Browse files Browse the repository at this point in the history
…ate run arguments in get_local_driver_version function
  • Loading branch information
competencytestlvl committed Sep 22, 2023
1 parent 1a20a3b commit 5dae4be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webdriver_auto_update/webdriver_auto_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def download_latest_version(self):
downloaded_zip.extractall(path=self.driver_directory)
os.remove(latest_driver_zip)
self.transfer_chromedriver_file()
print(f"\nSuccessfully downloaded chromedriver version {self.online_driver_version} to:\n{driver_directory}")
print(f"\nSuccessfully downloaded chromedriver version {self.online_driver_version} to:\n{self.driver_directory}")


def transfer_chromedriver_file(self):
Expand Down Expand Up @@ -132,7 +132,7 @@ def get_local_driver_version(self):
"""
try:
os.chdir(self.driver_directory)
cmd_run = subprocess.run("chromedriver --version", capture_output=True, text=True)
cmd_run = subprocess.run(args=["chromedriver", "--version"], capture_output=True, text=True)
local_driver_version = cmd_run.stdout.split()[1]
os.chdir(self.base_directory)
return local_driver_version
Expand Down Expand Up @@ -164,4 +164,4 @@ def main(self):
if __name__ == '__main__':
driver_directory = str(Path.home())
driver_manager = WebdriverAutoUpdate(driver_directory)
driver_manager.main()
driver_manager.main()

0 comments on commit 5dae4be

Please sign in to comment.