Пример #1
0
 def wrapper(service, *args, **kwargs):
     if service.description is None:
         raise exceptions.NotRetrievedError(
             'No service description retrieved for this service.')
     elif service.description == exceptions.NotAvailableError:
         return
     return func(service, *args, **kwargs)
Пример #2
0
 def wrapper(instance, *args, **kwargs):
     if instance.base_url is None:
         raise exceptions.NotRetrievedError(
             'No base URL was retrieved for this device.')
     return func(instance, *args, **kwargs)
Пример #3
0
 def wrapper(device, *args, **kwargs):
     if device.description is None:
         raise exceptions.NotRetrievedError(
             'No device description retrieved for this device.')
     return func(device, *args, **kwargs)