Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated with detail that exit code is non-0 on failure

  • Loading branch information...
commit 7b7c440387cd135988f91d72856c368ed555b322 1 parent 033aecb
@phunt authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  README.textile
  2. +2 −2 zkclient.py
View
2  README.textile
@@ -45,6 +45,8 @@ Options:
-q, --quiet quiet output, basically just success/failure
</pre>
+The exit code is 0 on success, non-0 exit code on failure.
+
Verbose output includes timing information for some critical operations (connection establishment, creating/deleting nodes, etc...).
<code>
View
4 zkclient.py
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import zookeeper, time, datetime, threading
+import zookeeper, time, threading
DEFAULT_TIMEOUT = 30000
@@ -37,7 +37,7 @@ def __init__(self, servers, timeout=DEFAULT_TIMEOUT):
if not options.quiet: print("Connecting to %s" % (servers))
start = time.time()
self.handle = zookeeper.init(servers, self.connection_watcher, timeout)
- self.conn_cv.wait()
+ self.conn_cv.wait(timeout/1000)
self.conn_cv.release()
if not self.connected:
Please sign in to comment.
Something went wrong with that request. Please try again.