commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/src GConnections.py


From: Jason Cater
Subject: gnue/common/src GConnections.py
Date: Tue, 17 Sep 2002 11:45:32 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/09/17 11:45:32

Modified files:
        common/src     : GConnections.py 

Log message:
        fixed bug in netrc support that prevented mysql or appserver logins

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GConnections.py.diff?tr1=1.41&tr2=1.42&r1=text&r2=text

Patches:
Index: gnue/common/src/GConnections.py
diff -c gnue/common/src/GConnections.py:1.41 
gnue/common/src/GConnections.py:1.42
*** gnue/common/src/GConnections.py:1.41        Tue Sep 17 11:27:44 2002
--- gnue/common/src/GConnections.py     Tue Sep 17 11:45:32 2002
***************
*** 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
          # (Remark: if .netrc should work under Win32 you have to
!       #  set the HOME environement variable [SET HOME=...])        
!          
          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,KeyError):
          pass
--- 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
          # (Remark: if .netrc should work under Win32 you have to
!       #  set the HOME environement variable [SET HOME=...])
! 
          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,KeyError):
          pass
***************
*** 241,249 ****
        if (loginData.has_key('password')):
          loginData['_password'] = loginData['password']
          del loginData['password']
- 
-       loginData.setdefault('_username')
-       loginData.setdefault('_password')
  
        try:
  
--- 241,246 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]