summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py2
-rw-r--r--b4/command.py9
-rw-r--r--setup.py2
3 files changed, 10 insertions, 3 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 203a0ed..c82fa35 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -19,7 +19,7 @@ from email import charset
charset.add_charset('utf-8', None)
emlpolicy = email.policy.EmailPolicy(utf8=True, cte_type='8bit', max_line_length=None)
-VERSION = '0.3.1'
+VERSION = '0.3.2'
ATTESTATION_FORMAT_VER = '0.1'
logger = logging.getLogger('b4')
diff --git a/b4/command.py b/b4/command.py
index 6830b92..9c2cbe9 100644
--- a/b4/command.py
+++ b/b4/command.py
@@ -8,6 +8,7 @@ __author__ = 'Konstantin Ryabitsev <konstantin@linuxfoundation.org>'
import argparse
import logging
import b4
+import sys
logger = b4.logger
@@ -49,8 +50,10 @@ def cmd_verify(cmdargs):
def cmd():
parser = argparse.ArgumentParser(
- formatter_class=argparse.ArgumentDefaultsHelpFormatter
+ description='A tool to work with public-inbox patches',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
+ parser.add_argument('--version', action='version', version=b4.VERSION)
parser.add_argument('-d', '--debug', action='store_true', default=False,
help='Add more debugging info to the output')
parser.add_argument('-q', '--quiet', action='store_true', default=False,
@@ -122,6 +125,10 @@ def cmd():
logger.addHandler(ch)
+ if 'func' not in cmdargs:
+ parser.print_help()
+ sys.exit(1)
+
cmdargs.func(cmdargs)
diff --git a/setup.py b/setup.py
index 6a80bb2..1b9d769 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-VERSION = '0.3.1'
+VERSION = '0.3.2'
NAME = 'b4'
setup(