wmllint: Skip inexistent paths passed in the command line

Fixes issue #3286.

[ci skip]

(cherry-picked from commit fbc9ac5a52)
This commit is contained in:
Iris Morelle 2018-06-28 00:25:42 -04:00
parent 2e3652f43f
commit 54a3546f1e
2 changed files with 8 additions and 0 deletions

View file

@ -83,6 +83,8 @@
* Fixed an issue with positioned sound sources ignoring the volume set in
Preferences after going off the audible radius and back (issue #3280).
* Fixed wmllint choking on gzipped binary files (e.g. gzipped tarballs).
* Fixed wmllint crashing on inexistent paths provided in the command line
(issue #3286).
## Version 1.14.3
### AI

View file

@ -3184,6 +3184,9 @@ In your case, your system interprets your arguments as:
arguments = ["."]
for directory in arguments:
if not os.path.exists(directory):
print("wmllint: skipping non-existent path %s" % directory)
continue
ofp = None
for fn in allcfgfiles(directory):
if verbose >= 2:
@ -3254,6 +3257,9 @@ In your case, your system interprets your arguments as:
for word in declared_spellings["GLOBAL"]:
d.add_to_session(word.lower())
for directory in arguments:
if not os.path.exists(directory):
print("wmllint: skipping non-existent path %s" % directory)
continue
ofp = None
for fn in allcfgfiles(directory):
if verbose >= 2: