diff options
| author | Mattias Andrée <maandree@operamail.com> | 2015-10-29 15:59:36 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2015-10-29 15:59:36 +0100 |
| commit | 8549c1222a34b37c6929321152c4c6a2824dc225 (patch) | |
| tree | 692812f7b9c3050a382664f6680280a13c82690b /passcheck.py | |
| parent | remove blacklist, a large one will added to another branch (diff) | |
| download | passcheck-8549c1222a34b37c6929321152c4c6a2824dc225.tar.gz passcheck-8549c1222a34b37c6929321152c4c6a2824dc225.tar.bz2 passcheck-8549c1222a34b37c6929321152c4c6a2824dc225.tar.xz | |
inform that black is located in large-files if missing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'passcheck.py')
| -rwxr-xr-x | passcheck.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/passcheck.py b/passcheck.py index 4734c20..e9e950f 100755 --- a/passcheck.py +++ b/passcheck.py @@ -113,8 +113,12 @@ def evaluate(data): blacklist = None -with open('blacklist', 'rb') as file: - blacklist = set(file.read().decode('utf-8', 'replace').split('\n')) +try: + with open('blacklist', 'rb') as file: + blacklist = set(file.read().decode('utf-8', 'replace').split('\n')) +except FileNotFoundError: + sys.stderr.write('File "blacklist" from the git branch "large-files" is not present.\n'); + sys.exit(1) for directory in ['/usr/share/dict/', '/usr/local/share/dict/']: dictionaries = None try: |
