From 0f8b0cef1f914a3c24dd4630d593bcd90e08be46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Sun, 20 Nov 2022 21:37:29 +0100 Subject: [PATCH] chg: [command] The selection of a sub-command is mandatory. --- bin/lsb.py | 4 +++- bin/parity.py | 2 +- bin/red.py | 2 +- bin/statistics.py | 2 +- pyproject.toml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/lsb.py b/bin/lsb.py index 7dd342c..1b09d2b 100755 --- a/bin/lsb.py +++ b/bin/lsb.py @@ -55,7 +55,8 @@ class ValidateGenerator(argparse.Action): def main(): parser = argparse.ArgumentParser(prog="stegano-lsb") - subparsers = parser.add_subparsers(help="sub-command help", dest="command") + subparsers = parser.add_subparsers( + help="sub-command help", dest="command", required=True) # Subparser: Hide parser_hide = subparsers.add_parser("hide", help="hide help") @@ -85,6 +86,7 @@ def main(): action=ValidateGenerator, nargs="*", required=False, + default=None, help="Generator (with optional arguments)", ) diff --git a/bin/parity.py b/bin/parity.py index 6c43015..c80bf82 100644 --- a/bin/parity.py +++ b/bin/parity.py @@ -30,7 +30,7 @@ import argparse try: from stegano.steganalysis import parity -except: +except Exception: print("Install Stegano: pipx install Stegano") diff --git a/bin/red.py b/bin/red.py index faad8b1..51230ca 100644 --- a/bin/red.py +++ b/bin/red.py @@ -28,7 +28,7 @@ import argparse try: from stegano import red -except: +except Exception: print("Install stegano: sudo pip install Stegano") diff --git a/bin/statistics.py b/bin/statistics.py index aa49654..b2f80a9 100644 --- a/bin/statistics.py +++ b/bin/statistics.py @@ -31,7 +31,7 @@ import argparse try: from stegano.steganalysis import statistics -except: +except Exception: print("Install Stegano: sudo pip install Stegano") diff --git a/pyproject.toml b/pyproject.toml index 1582182..54c15f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "stegano" -version = "0.11.0" +version = "0.11.1" description = "A pure Python Steganography module." authors = [ "Cédric Bonhomme "