wmlindent: check verbosity level after processing all the command line options

This fixes the same bug that Groggy Dice fixed in wmllint, and which caused -d -v to run wmlindent with a verbosity level of 2
This commit is contained in:
Elvish_Hunter 2015-05-29 10:42:22 +02:00
parent 96b92c99bf
commit b6250ff165

View file

@ -295,13 +295,14 @@ if __name__ == '__main__':
sys.exit(0)
elif opt in ('-d', '--dryrun'):
dryrun = True
verbose = max(1, verbose)
elif opt in ('-e', '--exclude'):
exclude.append(val)
elif opt in ('-q', '--quiet'):
quiet = True
elif opt in ('-v', '--verbose'):
verbose += 1
if dryrun:
verbose = max(1, verbose)
# in certain situations, Windows' command prompt appends a double quote
# to the command line parameters. This block takes care of this issue.
for i,arg in enumerate(arguments):