- try:
- v = c.version()
- print "unexpected success"
- ok = False
- except disorder.communicationError, e:
- if re.search("connection refused", str(e)):
- print "unexpected error: %s" % e
- ok = False
- else:
- ok = True
- dtest.stop_daemon()
- if not ok:
- sys.exit(1)
- # Try running the upgrade tool
- print "Attempting an upgrade..."
- rc = subprocess.call(["disorder-dbupgrade",
- "--config", "%s/config" % dtest.testroot])
- if rc != 0:
- print "disorder-dbupgrade: FAILED: exit code %s" % rc
- sys.exit(1)