wmllint: Exit with non-zero status after failing to read any directories
[ci skip]
(cherry-picked from commit ceca46c553
)
This commit is contained in:
parent
54a3546f1e
commit
6d4d48e540
1 changed files with 6 additions and 0 deletions
|
@ -3183,8 +3183,11 @@ In your case, your system interprets your arguments as:
|
|||
if not arguments:
|
||||
arguments = ["."]
|
||||
|
||||
failed_any_dirs = False
|
||||
|
||||
for directory in arguments:
|
||||
if not os.path.exists(directory):
|
||||
failed_any_dirs = True
|
||||
print("wmllint: skipping non-existent path %s" % directory)
|
||||
continue
|
||||
ofp = None
|
||||
|
@ -3258,6 +3261,7 @@ In your case, your system interprets your arguments as:
|
|||
d.add_to_session(word.lower())
|
||||
for directory in arguments:
|
||||
if not os.path.exists(directory):
|
||||
failed_any_dirs = True
|
||||
print("wmllint: skipping non-existent path %s" % directory)
|
||||
continue
|
||||
ofp = None
|
||||
|
@ -3267,6 +3271,8 @@ In your case, your system interprets your arguments as:
|
|||
spellcheck(fn, d)
|
||||
except ImportError:
|
||||
print("wmllint: spell check unavailable, install python-enchant to enable", file=sys.stderr)
|
||||
if failed_any_dirs:
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
print("Aborted")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue