Skip to content

Commit

Permalink
minor corrections and upgraded verion to 0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Amine authored and hezanathos committed Jul 25, 2024
1 parent 7b8af1c commit 8bcdcea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/bin/airgap/download_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def download_individual_script(scriptID, base_dir, CBW_API, with_attachment=Fals
def manager(arguments, CBW_API, verify_ssl=False):

parser = argparse.ArgumentParser()
parser.add_argument("--add-attachment", action="store_false")
parser.add_argument("--add-attachment", action="store_true")
parser.add_argument("--dest-dir", default="cyberwatch-airgap")
parser.add_argument("help", nargs="?")
options = parser.parse_args(arguments)
Expand Down
8 changes: 4 additions & 4 deletions cli/cyberwatch-cli
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def help():
print("{: >15} \t {}".format("ping", "Ping the Cyberwatch API to validate the connexion"))
print("\n")

def ping(CBW_API, verify_ssl=False):
def ping(CBW_API, verify_ssl=False, verbose=False):
apiResponse = CBW_API.request(
method="GET",
endpoint="/api/v3/ping",
verify_ssl=verify_ssl
)
print("Trying to ping Cyberwatch API...")
if verbose : print("Trying to ping Cyberwatch API...")
response = next(apiResponse).json()
print(response)
if verbose: print(response)
if response.get("error") is not None:
print("Failed ping to Cyberwatch API, exiting...")
sys.exit(1)
Expand Down Expand Up @@ -69,7 +69,7 @@ try:
if not arguments or arguments[0] == "help":
help()
elif arguments[0] == "ping":
ping(CBW_API, VERIFY_SSL)
ping(CBW_API, VERIFY_SSL, True)
elif arguments[0] == "os":
ping(CBW_API, VERIFY_SSL)
os.manager(arguments[1:], CBW_API, VERIFY_SSL)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='cyberwatch_api',
version='0.3.6',
version='0.3.7',
description='Python Api client for the Cyberwatch software',
long_description=open('README.md').read().strip(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 8bcdcea

Please sign in to comment.