commit-gnue
[Top][All Lists]
Advanced

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

gnue/common/src GConnections.py


From: Arturas Kriukovas
Subject: gnue/common/src GConnections.py
Date: Thu, 02 May 2002 12:21:26 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Arturas Kriukovas <address@hidden>      02/05/02 12:21:24

Modified files:
        common/src     : GConnections.py 

Log message:
        Added GImport.py import, i18n changes.

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

Patches:
Index: gnue/common/src/GConnections.py
diff -c gnue/common/src/GConnections.py:1.32 
gnue/common/src/GConnections.py:1.33
*** gnue/common/src/GConnections.py:1.32        Sat Apr 27 19:13:48 2002
--- gnue/common/src/GConnections.py     Thu May  2 12:21:24 2002
***************
*** 36,41 ****
--- 36,42 ----
  import GDataObjects
  import GLoginHandler
  from gnue.common import openResource, dyn_import
+ import GImport
  
  class Error(StandardError):
    # Base error
***************
*** 74,88 ****
          self._parser.readfp(fileHandle)
        except DuplicateSectionError:
          raise InvalidFormatError, \
!            'The connections file has duplicate source definitions.\n\nFile: 
%s' \
                % location
        except MissingSectionError:
          raise InvalidFormatError, \
!            'The connections file has no source definitions.\n\nFile: %s' \
                % location
        except:
          raise InvalidFormatError, \
!            'The connections file cannot be parsed.\n\nFile: %s' % location
  
      self._openConnections = {}
  
--- 75,89 ----
          self._parser.readfp(fileHandle)
        except DuplicateSectionError:
          raise InvalidFormatError, \
!            _('The connections file has duplicate source definitions.\n\nFile: 
%s') \
                % location
        except MissingSectionError:
          raise InvalidFormatError, \
!            _('The connections file has no source definitions.\n\nFile: %s') \
                % location
        except:
          raise InvalidFormatError, \
!            _('The connections file cannot be parsed.\n\nFile: %s') % location
  
      self._openConnections = {}
  
***************
*** 131,137 ****
          return default
      except KeyError:
        raise NotFoundError, \
!          'The connections file does not contain a definition \n       for 
"%s".\n\nFile: %s' \
              % (connection_name, self._location)
  
  
--- 132,138 ----
          return default
      except KeyError:
        raise NotFoundError, \
!          _('The connections file does not contain a definition \n       for 
"%s".\n\nFile: %s') \
              % (connection_name, self._location)
  
  
***************
*** 166,172 ****
        return copy.deepcopy(self._definitions[connection_name])
      except KeyError:
        raise NotFoundError, \
!          'The connections file does not contain a definition \n       for 
"%s".\n\nFile: %s' \
              % (connection_name, self._location)
  
  
--- 167,173 ----
        return copy.deepcopy(self._definitions[connection_name])
      except KeyError:
        raise NotFoundError, \
!          _('The connections file does not contain a definition \n       for 
"%s".\n\nFile: %s') \
              % (connection_name, self._location)
  
  
***************
*** 240,245 ****
--- 241,247 ----
          except GDataObjects.LoginError, error:
            # Oops, they must have entered an invalid user/password.
            # Those silly users.
+         # user: Hey! Who are you calling silly?!!!
            attempts = attempts - 1
            errortext = string.replace("%s" % error,'\n','')
  
***************
*** 247,258 ****
              # Four times is plenty...
              self._loginHandler.destroyLoginDialog()
              raise GDataObjects.LoginError, \
!                "Unable to log in after 4 attempts.\n\nError: %s" % error
  
          except GLoginHandler.UserCanceledLogin:
            # Guess they changed their minds. Treat as a login error.
            self._loginHandler.destroyLoginDialog()
!           raise GDataObjects.LoginError, "User canceled the login request."
  
  
  
--- 249,260 ----
              # Four times is plenty...
              self._loginHandler.destroyLoginDialog()
              raise GDataObjects.LoginError, \
!                _("Unable to log in after 4 attempts.\n\nError: %s") % error
  
          except GLoginHandler.UserCanceledLogin:
            # Guess they changed their minds. Treat as a login error.
            self._loginHandler.destroyLoginDialog()
!           raise GDataObjects.LoginError, _("User canceled the login request.")
  
  
  
***************
*** 267,273 ****
      GDebug.printMesg(1,'ImportError importing driver %s' % (driver))
      GDebug.printMesg(1,err)
      raise GDataObjects.ProviderNotSupportedError, \
!        "No database driver found for provider type '%s'" % driver
  
    try:
      dd = dbdriver.supportedDataObjects[type]()
--- 269,275 ----
      GDebug.printMesg(1,'ImportError importing driver %s' % (driver))
      GDebug.printMesg(1,err)
      raise GDataObjects.ProviderNotSupportedError, \
!        _("No database driver found for provider type '%s'") % driver
  
    try:
      dd = dbdriver.supportedDataObjects[type]()
***************
*** 275,280 ****
      return dd
    except KeyError:
      raise GDataObjects.ObjectTypeNotAvailableError, \
!        "DB Driver '%s' does not support source type '%s'" % (driver, type)
  
  
--- 277,282 ----
      return dd
    except KeyError:
      raise GDataObjects.ObjectTypeNotAvailableError, \
!        _("DB Driver '%s' does not support source type '%s'") % (driver, type)
  
  



reply via email to

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