/[papo]/gnue/common/src/commdrivers/sockets/CommDriver.py
ViewVC logotype

Diff of /gnue/common/src/commdrivers/sockets/CommDriver.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by charlie, Fri Jun 28 19:43:51 2002 UTC revision 1.1.4.1 by anthonyl, Tue Mar 4 22:09:33 2003 UTC
# Line 16  Line 16 
16  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
17  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
18  #  #
19  # Copyright 2001 Free Software Foundation  # Copyright 2001-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # sockets/CommDriver.py  # sockets/CommDriver.py
# Line 81  class ClientAdapter(GCommBase.Client): Line 81  class ClientAdapter(GCommBase.Client):
81          raise KeyError          raise KeyError
82    
83        if not hasattr(socket, 'AF_UNIX'):        if not hasattr(socket, 'AF_UNIX'):
84          raise GComm.AdapterConfigurationError,  \          tmsg =   _("Your configuration references a file-based sockets connection.\n") \
85            _("Your configuration references a file-based sockets connection.\n") \                 + _("However, your operating system does not support file-based sockets.")
86          + _("However, your operating system does not support file-based sockets.")          raise GComm.AdapterConfigurationError,  tmsg
87    
88        self._location = file        self._location = file
89    
# Line 93  class ClientAdapter(GCommBase.Client): Line 93  class ClientAdapter(GCommBase.Client):
93          self.__socket.connect(file)          self.__socket.connect(file)
94    
95        except:        except:
96          raise AdapterInitializationError, \          tmsg =   _("Unable to initialize the requested socket located at %s") % \
97            _("Unable to initialize the requested socket located at %s") % \                  (file)
98               (file)          raise AdapterInitializationError, tmsg
99    
100    
101      except KeyError:      except KeyError:
# Line 110  class ClientAdapter(GCommBase.Client): Line 110  class ClientAdapter(GCommBase.Client):
110          self.__socket.connect((host, port))          self.__socket.connect((host, port))
111    
112        except KeyError:        except KeyError:
113          raise GComm.AdapterConfigurationError, \          tmsg =  _("To use the sockets commdriver, you must specify either a sockets") \
114            _("To use the sockets commdriver, you must specify either a sockets") \                + _("\nfile or a host and port number.  Please see documentation.")
115            + _("\nfile or a host and port number.  Please see documentation.")          raise GComm.AdapterConfigurationError, tmsg
116    
117        except:        except:
118          raise AdapterInitializationError, \          tmsg = _("Unable to initialize the requested socket located at %s:%s") % \
119            _("Unable to initialize the requested socket located at %s:%s") % \                 (host,port)
120               (host,port)          raise AdapterInitializationError, tmsg
121    
122    
123    def __repr__(self):    def __repr__(self):

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26