git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@749
959494ce-11ee-0310-bf91-
de5d638817bd
return result[0]
def mustconnect(host, port = -1):
return result[0]
def mustconnect(host, port = -1):
+ fd = connect(host, port)
while True:
resp = getresp()
if resp is not None and resp.getcmd() == u".connect":
while True:
resp = getresp()
if resp is not None and resp.getcmd() == u".connect":
select()
if resp.getcode() != 200:
raise RuntimeError, resp.intresp()[0][0]
select()
if resp.getcode() != 200:
raise RuntimeError, resp.intresp()[0][0]
def cnl(host = None, port = -1, useauthless = True, **kw):
if host is None:
host = os.getenv("DCSERVER")
if host is None:
raise ValueError, "No DC host to connect to"
def cnl(host = None, port = -1, useauthless = True, **kw):
if host is None:
host = os.getenv("DCSERVER")
if host is None:
raise ValueError, "No DC host to connect to"
- mustconnect(host, port)
+ fd = mustconnect(host, port)
err, reason = login(useauthless, **kw)
if err != "success":
raise RuntimeError, (err, reason)
err, reason = login(useauthless, **kw)
if err != "success":
raise RuntimeError, (err, reason)
def ecmd(*args):
tag = qcmd(*args)
def ecmd(*args):
tag = qcmd(*args)