From 17537706a99e4baf6ceca6e66df520f2b675a775 Mon Sep 17 00:00:00 2001 From: fredrik Date: Thu, 23 Nov 2006 01:15:15 +0000 Subject: [PATCH] Connect to localhost instead of failing. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@768 959494ce-11ee-0310-bf91-de5d638817bd --- lib/python/dolcon/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/dolcon/__init__.py b/lib/python/dolcon/__init__.py index bb44567..8675b38 100644 --- a/lib/python/dolcon/__init__.py +++ b/lib/python/dolcon/__init__.py @@ -47,14 +47,14 @@ def cnl(host = None, port = -1, useauthless = True, **kw): """A convenience function for connect and loginasync. This function will connect to the given server, or the server in - the environment variable $DCSERVER if none is given, and - authenticate to the server. If any of the steps fail, an exception - is raised. + the environment variable $DCSERVER if none is given, or, if that + fails, localhost, and authenticate to the server. If any of the + steps fail, an exception is raised. """ if host is None: host = os.getenv("DCSERVER") if host is None: - raise ValueError, "No DC host to connect to" + host = "localhost" fd = mustconnect(host, port) err, reason = login(useauthless, **kw) if err != "success": -- 2.11.0