Commits

Ronny Pfannschmidt  committed ec97ac4

small cleanup

  • Participants
  • Parent commits 67357a6

Comments (0)

Files changed (1)

File couchdb_compose/cli.py

 """
 
 from __future__ import print_function
-import py
+import json
+import sys
+import time
 
 def _dispatch(args, composer):
     g = globals()
 
 
 def show(args, composer):
-    py.std.json.dump(composer.doc, py.std.sys.stdout, indent=1, sort_keys=True)
+    json.dump(composer.doc, sys.stdout, indent=1, sort_keys=True)
 
 
 def push(args, composer):
     #XXX worst progres bar ever :P
     found = True
     while found:
-        py.std.time.sleep(.1)
+        time.sleep(.1)
         tasks = db.server.active_tasks()
         found = False
         for task in tasks:
     try:
         db.server.res.post('/_restart', headers={"Content-Type": "application/json"})
     except http_parser.http.NoMoreData:
+        # couchdb before 1.3 commits suicide before sending a http 200
+        # couchdb 1.3 sends a http 202 before commiting suicide
         pass