~launchpad-pqm/launchpadlib/devel

« back to all changes in this revision

Viewing changes to launchpadlib/resource.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-02-09 04:33:05 UTC
  • mfrom: (32.1.1 call_params)
  • Revision ID: launchpad@pqm.canonical.com-20090209043305-mc1p0mhiuwcw035e
[r=rockstar] Make the error message if not using key word args
        slightly more understandable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        self.resource = resource
328
328
        self.wadl_method = wadl_method
329
329
 
330
 
    def __call__(self, **kwargs):
 
330
    def __call__(self, *args, **kwargs):
331
331
        """Invoke the method and process the result."""
 
332
        if len(args) > 0:
 
333
            raise TypeError('Method must be called with keyword args.')
332
334
        http_method = self.wadl_method.name
333
335
        args = self._transform_resources_to_links(kwargs)
334
336
        for key, value in args.items():