robotframework-browser-tray 1.5.1__tar.gz → 1.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: robotframework-browser-tray
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: Tray icon and REPL for trying out Browser Library keywords using Chromium or Edge
5
5
  Author-email: Marduk Bolaños <marduk.bolanos@imbus.de>
6
6
  Requires-Python: >=3.8.2
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "robotframework-browser-tray"
3
- version = "1.5.1"
3
+ version = "1.5.2"
4
4
  description = "Tray icon and REPL for trying out Browser Library keywords using Chromium or Edge"
5
5
  authors = [
6
6
  {name = "Marduk Bolaños", email = "marduk.bolanos@imbus.de"},
@@ -1,4 +1,4 @@
1
- import http
1
+ import http.client
2
2
  import socket
3
3
  import sys
4
4
  import tempfile
@@ -1,6 +1,8 @@
1
1
  import argparse
2
+ import http.client
2
3
  import os
3
4
  import site
5
+ import socket
4
6
  import subprocess
5
7
  import sys
6
8
  import time
@@ -161,5 +163,11 @@ def run():
161
163
  )
162
164
  sys.exit(1)
163
165
 
164
- tray_icon = TrayIcon(playwright_process_port, remote_debugging_port)
165
- tray_icon.run()
166
+ try:
167
+ http.client.HTTPConnection('127.0.0.1', playwright_process_port, timeout=1).connect()
168
+ print("The port 4711 is already in use. Either browser-tray is already running or another process is using the port.\n" +
169
+ "To start the Playwright wrapper on another port execute `browser-tray --pw-port PORT`")
170
+ sys.exit(1)
171
+ except socket.timeout:
172
+ tray_icon = TrayIcon(playwright_process_port, remote_debugging_port)
173
+ tray_icon.run()