projects
/
mutt-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48f4bd8
)
prevent an error when no search string is given
author
Niels de Vos
<devos@fedoraproject.org>
Thu, 13 Dec 2012 09:35:05 +0000
(10:35 +0100)
committer
Wade Berrier
<wberrier@gmail.com>
Sun, 20 Jan 2013 03:36:04 +0000
(20:36 -0700)
mutt-ldap.py
patch
|
blob
|
history
diff --git
a/mutt-ldap.py
b/mutt-ldap.py
index 05df6f18afd2adf77dbda1e7356e6e4ef75c298c..4117177a6aeb49aaad53cfda255d7e76e1bc4743 100755
(executable)
--- a/
mutt-ldap.py
+++ b/
mutt-ldap.py
@@
-157,6
+157,10
@@
def cache_persist(query, addresses):
if __name__ == '__main__':
import sys
+ if len(sys.argv) < 2:
+ sys.stderr.write('{0}: no search string given\n'.format(sys.argv[0]))
+ sys.exit(1)
+
query = unicode(' '.join(sys.argv[1:]), 'utf-8')
(cache_hit, addresses) = cache_lookup(query)