Revision 2f8bc438 ncclient/operations/util.py

b/ncclient/operations/util.py
1 1
#!/usr/bin/env python
2 2

  
3
'boilerplate'
3
'Boilerplate'
4 4

  
5 5
from ncclient import OperationError
6 6

  
7
class MissingCapabilityError(OperationError):
8
    pass
7
from . import MissingCapabilityError
9 8

  
10 9
def one_of(self, *args):
11 10
    for i, arg in enumerate(args):
......
20 19

  
21 20
def assert_capability(key, capabilities):
22 21
    if key not in capabilities:
23
        raise MissingCapabilityError
22
        raise MissingCapabilityError('[%s] capability is required for this operation' % key)
24 23

  
25 24

  
26 25
def store_or_url(store, url):

Also available in: Unified diff