Skip to content

Commit

Permalink
Merge 9e1ff1e into 0b2956d
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostofGoes authored Mar 7, 2020
2 parents 0b2956d + 9e1ff1e commit 1e978f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
0.42 (unreleased)
-----------------

- Nothing changed yet.
- Added ``-q``/``--quiet`` command line argument. This will reduce the verbosity
of informational output, e.g. for use in a CI pipeline.


0.41 (2020-02-25)
Expand Down
15 changes: 12 additions & 3 deletions check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Failure(Exception):
#

VERBOSE = False
QUIET = False

_to_be_continued = False
def _check_tbc():
Expand All @@ -69,6 +70,8 @@ def _check_tbc():


def info(message):
if QUIET:
return
_check_tbc()
print(message)

Expand Down Expand Up @@ -994,8 +997,10 @@ def main():
help='location for the source tree')
parser.add_argument('--version', action='version',
version='%(prog)s version ' + __version__)
parser.add_argument('-v', '--verbose', action='store_true',
help='more verbose output')
parser.add_argument('--quiet', action='store_const', dest='quiet',
const=0, default=1, help='reduced output verbosity')
parser.add_argument('--verbose', action='store_const', dest='verbose',
const=1, default=0, help='more verbose output')
parser.add_argument('-c', '--create', action='store_true',
help='create a MANIFEST.in if missing')
parser.add_argument('-u', '--update', action='store_true',
Expand All @@ -1016,9 +1021,13 @@ def main():
if args.ignore_bad_ideas:
IGNORE_BAD_IDEAS.extend(args.ignore_bad_ideas.split(','))

if args.verbose:
verbosity = args.quiet + args.verbose
if verbosity >= 2:
global VERBOSE
VERBOSE = True
if not verbosity:
global QUIET
QUIET = True

try:
if not check_manifest(args.source_tree, create=args.create,
Expand Down

0 comments on commit 1e978f6

Please sign in to comment.