pythonでldap使う時のtimeout処理の方法 デフォルトではtimeoutしないので、5秒でtimeoutするようにする。 環境 python 2.7 import ldap l = ldap.initialize('ldap://servername:389') l.set_option(ldap.OPT_NETWORK_TIMEOUT, 5.0) l.simple_bind_s('username', 'password') timeoutしたら、ldap.SERVER_DOWN exceptionになるみたい。 あるいは import ldap l = ldap.initialize('ldap://servername:389') l.set_option(ldap.OPT_TIMEOUT, 5.0) l.simple_bind_s('username', 'passwo
# Copyright (c) 2009, Peter Sagerson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the ab
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く