[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GConnections.py
From: |
Jan Ischebeck |
Subject: |
gnue/common/src GConnections.py |
Date: |
Sun, 08 Sep 2002 11:52:39 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 02/09/08 11:52:39
Modified files:
common/src : GConnections.py
Log message:
don't break forms if netrc file empty or in a wrong format.
add small info about the contents of a .netrc file.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GConnections.py.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
Patches:
Index: gnue/common/src/GConnections.py
diff -c gnue/common/src/GConnections.py:1.37
gnue/common/src/GConnections.py:1.38
*** gnue/common/src/GConnections.py:1.37 Sat Sep 7 12:08:01 2002
--- gnue/common/src/GConnections.py Sun Sep 8 11:52:38 2002
***************
*** 212,226 ****
# Get the parameters from the Connections Definition File
loginData = self.getConnectionParameters(connection_name)
try:
! # load the user's netrc file
netrcData = netrc.netrc().authenticators(
"'gnue://%s/'" % connection_name )
! GDebug.printMesg(5, 'Read the user\'s .netrc file')
! loginData['_username'] = netrcData[0][1:-1]
! loginData['_password'] = netrcData[2][1:-1]
! GDebug.printMesg(5, 'Found useful stuff for connection %s in the
user\'s .netrc file' % connection_name)
! except IOError:
pass
if (loginData.has_key('username')):
--- 212,235 ----
# Get the parameters from the Connections Definition File
loginData = self.getConnectionParameters(connection_name)
+
try:
! # load the user's netrc file:
! # a sample .netrc could look like:
! # <.netrc begin>
! # machine 'gnue://my_connection/'
! # login 'mylogin'
! # password 'mypassword'
! # EOF
!
netrcData = netrc.netrc().authenticators(
"'gnue://%s/'" % connection_name )
! if netrcData!=None:
! GDebug.printMesg(5, 'Read the user\'s .netrc file')
! loginData['_username'] = netrcData[0][1:-1]
! loginData['_password'] = netrcData[2][1:-1]
! GDebug.printMesg(5, 'Found useful stuff for connection %s in the
user\'s .netrc file' % connection_name)
! except IOError,netrc.NetrcParseError:
pass
if (loginData.has_key('username')):