portune 0.1.13__tar.gz → 0.1.15__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.

Potentially problematic release.


This version of portune might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: portune
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Author: Franck Jouvanceau
6
6
  Maintainer: Franck Jouvanceau
@@ -14,6 +14,7 @@ Classifier: Intended Audience :: System Administrators
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Operating System :: Unix
16
16
  Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
17
18
  Classifier: Programming Language :: Python
18
19
  Classifier: Programming Language :: Python :: 3
19
20
  Classifier: Programming Language :: Python :: 3.9
@@ -708,9 +708,16 @@ def ping_host(ip: str, timeout: float = 2.0) -> bool:
708
708
  try:
709
709
  # Using -c 1 for count=1, -W timeout for timeout in seconds
710
710
  # Windows uses -n 1 for count=1, -w timeout in milliseconds
711
+ # macOS uses -c 1 for count=1, -t timeout in seconds
712
+ # SunOS uses host timeout
711
713
  # These are standard Linux ping parameters
712
- if platform.system().lower() == "windows":
714
+ system = platform.system().lower()
715
+ if system == "windows":
713
716
  command = ["ping", "-n", "1", "-w", str(int(timeout * 1000)), ip]
717
+ elif system == "darwin": # macOS
718
+ command = ['ping', '-c', '1', '-t', str(int(timeout)), ip]
719
+ elif system == "sunos": # SunOS
720
+ command = ['ping', ip, str(int(timeout))]
714
721
  else:
715
722
  command = ['ping', '-c', '1', '-W', str(int(timeout)), ip]
716
723
  output = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout)
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.1.13'
21
- __version_tuple__ = version_tuple = (0, 1, 13)
20
+ __version__ = version = '0.1.15'
21
+ __version_tuple__ = version_tuple = (0, 1, 15)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: portune
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Author: Franck Jouvanceau
6
6
  Maintainer: Franck Jouvanceau
@@ -14,6 +14,7 @@ Classifier: Intended Audience :: System Administrators
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Operating System :: Unix
16
16
  Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
17
18
  Classifier: Programming Language :: Python
18
19
  Classifier: Programming Language :: Python :: 3
19
20
  Classifier: Programming Language :: Python :: 3.9
@@ -21,6 +21,7 @@ classifiers = [
21
21
  "Operating System :: POSIX",
22
22
  "Operating System :: Unix",
23
23
  "Operating System :: MacOS",
24
+ "Operating System :: Microsoft :: Windows",
24
25
  "Programming Language :: Python",
25
26
  "Programming Language :: Python :: 3",
26
27
  "Programming Language :: Python :: 3.9",
File without changes
File without changes
File without changes
File without changes
File without changes