aboutsummaryrefslogtreecommitdiffstats
path: root/passcheck.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-29 15:59:36 +0100
committerMattias Andrée <maandree@operamail.com>2015-10-29 15:59:36 +0100
commit8549c1222a34b37c6929321152c4c6a2824dc225 (patch)
tree692812f7b9c3050a382664f6680280a13c82690b /passcheck.py
parentremove blacklist, a large one will added to another branch (diff)
downloadpasscheck-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-xpasscheck.py8
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: