mutt_ldap.py: Use LOG.error() instead of sys.stderr.write()
authorW. Trevor King <wking@tremily.us>
Thu, 24 Jan 2013 22:25:47 +0000 (17:25 -0500)
committerW. Trevor King <wking@tremily.us>
Thu, 24 Jan 2013 22:32:17 +0000 (17:32 -0500)
mutt_ldap.py

index 64e4da4ff525fafd98b1ce44fd5d8327f4c26ac5..cab0222aecd392e2d53507a6569a5897f9e32e77 100755 (executable)
@@ -287,8 +287,7 @@ if __name__ == '__main__':
     LOG.info(u'loaded configuration from {0}'.format(read_configfiles))
 
     if len(_sys.argv) < 2:
-        _sys.stderr.write(
-            u'{0}: no search string given\n'.format(_sys.argv[0]))
+        LOG.error(u'{0}: no search string given'.format(_sys.argv[0]))
         _sys.exit(1)
 
     query = u' '.join(_sys.argv[1:])