portune 0.1.20__tar.gz → 1.0.0__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.
- {portune-0.1.20/portune.egg-info → portune-1.0.0}/PKG-INFO +1 -1
- {portune-0.1.20 → portune-1.0.0}/portune/portune.py +6 -3
- {portune-0.1.20 → portune-1.0.0}/portune/version.py +2 -2
- {portune-0.1.20 → portune-1.0.0/portune.egg-info}/PKG-INFO +1 -1
- {portune-0.1.20 → portune-1.0.0}/.github/workflows/python-publish.yml +0 -0
- {portune-0.1.20 → portune-1.0.0}/.gitignore +0 -0
- {portune-0.1.20 → portune-1.0.0}/LICENSE +0 -0
- {portune-0.1.20 → portune-1.0.0}/README.md +0 -0
- {portune-0.1.20 → portune-1.0.0}/portune/__init__.py +0 -0
- {portune-0.1.20 → portune-1.0.0}/portune.egg-info/SOURCES.txt +0 -0
- {portune-0.1.20 → portune-1.0.0}/portune.egg-info/dependency_links.txt +0 -0
- {portune-0.1.20 → portune-1.0.0}/portune.egg-info/entry_points.txt +0 -0
- {portune-0.1.20 → portune-1.0.0}/portune.egg-info/top_level.txt +0 -0
- {portune-0.1.20 → portune-1.0.0}/pyproject.toml +0 -0
- {portune-0.1.20 → portune-1.0.0}/setup.cfg +0 -0
|
@@ -32,6 +32,9 @@ from email.mime.application import MIMEApplication
|
|
|
32
32
|
from typing import List, Dict, Tuple, Any, Optional, Union
|
|
33
33
|
|
|
34
34
|
# Constants and global variables
|
|
35
|
+
|
|
36
|
+
# Use system ping command based on the OS
|
|
37
|
+
# as raw socket ICMP ping requires privileges
|
|
35
38
|
OS = platform.system().lower()
|
|
36
39
|
if OS == "windows":
|
|
37
40
|
PING = "ping -n 1 -w {timeoutms} {ip}"
|
|
@@ -40,9 +43,9 @@ elif OS == "darwin": # macOS
|
|
|
40
43
|
elif OS == "sunos": # SunOS
|
|
41
44
|
PING = "ping {ip} {timeout}"
|
|
42
45
|
elif OS == "aix": # IBM AIX
|
|
43
|
-
PING = "ping -c 1 -w
|
|
44
|
-
elif OS.startswith("hp-ux"): # HP-UX
|
|
45
|
-
PING = "ping -n 1 -
|
|
46
|
+
PING = "ping -c 1 -w {timeout} {ip}"
|
|
47
|
+
elif OS.startswith("hp-ux"): # HP-UX 11.11+
|
|
48
|
+
PING = "ping -n 1 -m {timeout} {ip}"
|
|
46
49
|
else:
|
|
47
50
|
PING = "ping -c 1 -W {timeout} {ip}"
|
|
48
51
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|