Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / agent

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 7
  • Merge Requests 0
  • Wiki
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
Merged
Merge request !2 opened Aug 18, 2014 by Őry Máté@orymate 
  • Report abuse
Report abuse

properly check command arguments #6

  • Discussion 2
  • Commits 4
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Őry Máté @orymate commented Aug 18, 2014
    Owner

    ``` mergeld be 👍

    ```<tarokkk> mergeld be :+1: ```
  • Őry Máté
    @orymate started a discussion on the diff Aug 18, 2014
    agent.py
    357 raise AttributeError(u'Command not found: %s (%s)' % (command, e))
    358
    359 if not isinstance(func, FunctionType):
    360 raise AttributeError("Command refers to non-static method %s." %
    361 unicode(func))
    362
    363 # check for unexpected keyword arguments
    364 argspec = getargspec(func)
    365 if argspec.keywords is None: # _operation doesn't take ** args
    366 unexpected_kwargs = set(args) - set(argspec.args)
    367 if unexpected_kwargs:
    368 raise TypeError(
    369 "Command %s got unexpected keyword arguments: %s" % (
    370 unicode(func), ", ".join(unexpected_kwargs)))
    371
    372 if argspec.defaults:
    • Őry Máté @orymate commented Aug 18, 2014
      Owner

      this part could be outside the if body

      this part could be outside the `if` body
    Please register or sign in to reply
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
1
1 participant
Reference: circle/agent!2