portune 0.1.14__py3-none-any.whl → 0.1.15__py3-none-any.whl
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.
- portune/portune.py +8 -1
- portune/version.py +2 -2
- {portune-0.1.14.dist-info → portune-0.1.15.dist-info}/METADATA +1 -1
- portune-0.1.15.dist-info/RECORD +9 -0
- portune-0.1.14.dist-info/RECORD +0 -9
- {portune-0.1.14.dist-info → portune-0.1.15.dist-info}/WHEEL +0 -0
- {portune-0.1.14.dist-info → portune-0.1.15.dist-info}/entry_points.txt +0 -0
- {portune-0.1.14.dist-info → portune-0.1.15.dist-info}/licenses/LICENSE +0 -0
- {portune-0.1.14.dist-info → portune-0.1.15.dist-info}/top_level.txt +0 -0
portune/portune.py
CHANGED
|
@@ -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
|
-
|
|
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)
|
portune/version.py
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
portune/__init__.py,sha256=RfXuNfHBqfRt_z4IukwN1a0oeCXahuMOO8_eBt4T8NM,58
|
|
2
|
+
portune/portune.py,sha256=bzy0ZN_Dp_px-ioNiJHt0mHv3K2iYoRKBwD2YBV6wJw,67837
|
|
3
|
+
portune/version.py,sha256=OX-WIjJlMaFvqRmCfLtOYEOYoiov9NdOA089N36rG-g,513
|
|
4
|
+
portune-0.1.15.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
|
5
|
+
portune-0.1.15.dist-info/METADATA,sha256=qlV_GKauDA8PiPt1c3jQN92SJSfEFuJwAYH-vhOQxSk,2249
|
|
6
|
+
portune-0.1.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
portune-0.1.15.dist-info/entry_points.txt,sha256=6j7jAf5fOZrLPbVIs3z92R1tT891WyY9YxQ6OVnPKG0,80
|
|
8
|
+
portune-0.1.15.dist-info/top_level.txt,sha256=CITDikHhRKAsSOGmNJzD-xSp6D5iBhSr9ZS1qy8-SL0,8
|
|
9
|
+
portune-0.1.15.dist-info/RECORD,,
|
portune-0.1.14.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
portune/__init__.py,sha256=RfXuNfHBqfRt_z4IukwN1a0oeCXahuMOO8_eBt4T8NM,58
|
|
2
|
-
portune/portune.py,sha256=6uZkcsMAEJt8yROPsl92VMYIPDypQosx0SZdJypN9gs,67510
|
|
3
|
-
portune/version.py,sha256=O_r2EWoixTKREu-RyeL8e93UHfqprj1LCIlwiWXfHcg,513
|
|
4
|
-
portune-0.1.14.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
|
5
|
-
portune-0.1.14.dist-info/METADATA,sha256=GY3MMpkfSXvsKnw2I8jL6mR1Qqz2at1ZYcXU2WHXdeA,2249
|
|
6
|
-
portune-0.1.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
portune-0.1.14.dist-info/entry_points.txt,sha256=6j7jAf5fOZrLPbVIs3z92R1tT891WyY9YxQ6OVnPKG0,80
|
|
8
|
-
portune-0.1.14.dist-info/top_level.txt,sha256=CITDikHhRKAsSOGmNJzD-xSp6D5iBhSr9ZS1qy8-SL0,8
|
|
9
|
-
portune-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|