Back to index

system-config-printer  1.3.9+20120706
Public Member Functions | Private Member Functions | Private Attributes
cupshelpers.cupshelpers._GetDevicesCall Class Reference

List of all members.

Public Member Functions

def call

Private Member Functions

def _reply_handler

Private Attributes

 _client_reply_handler

Detailed Description

Definition at line 583 of file cupshelpers.py.


Member Function Documentation

def cupshelpers.cupshelpers._GetDevicesCall._reply_handler (   self,
  connection,
  devices 
) [private]

Definition at line 594 of file cupshelpers.py.

00594 
00595     def _reply_handler (self, connection, devices):
00596         for uri, data in devices.iteritems():
00597             device = Device(uri, **data)
00598             devices[uri] = device
00599             if device.info != '' and device.make_and_model == '':
00600                 device.make_and_model = device.info
00601 
00602         if self._client_reply_handler:
00603             self._client_reply_handler (connection, devices)
00604         else:
00605             return devices
            
def cupshelpers.cupshelpers._GetDevicesCall.call (   self,
  connection,
  kwds 
)

Definition at line 584 of file cupshelpers.py.

00584 
00585     def call (self, connection, kwds):
00586         if kwds.has_key ("reply_handler"):
00587             self._client_reply_handler = kwds.get ("reply_handler")
00588             kwds["reply_handler"] = self._reply_handler
00589             return connection.getDevices (**kwds)
00590 
00591         self._client_reply_handler = None
00592         result = connection.getDevices (**kwds)
00593         return self._reply_handler (connection, result)


Member Data Documentation

Definition at line 586 of file cupshelpers.py.


The documentation for this class was generated from the following file: