Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6518fe6a
authored
Aug 18, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if command is a staticmethod
parent
978084f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
agent.py
+5
-0
No files found.
agent.py
View file @
6518fe6a
...
...
@@ -20,6 +20,7 @@ from StringIO import StringIO
from
base64
import
decodestring
from
shutil
import
rmtree
,
move
from
datetime
import
datetime
from
types
import
FunctionType
from
utils
import
SerialLineReceiverBase
...
...
@@ -355,6 +356,10 @@ class SerialLineReceiver(SerialLineReceiverBase):
except
AttributeError
as
e
:
raise
AttributeError
(
u'Command not found:
%
s (
%
s)'
%
(
command
,
e
))
if
not
isinstance
(
func
,
FunctionType
):
raise
AttributeError
(
"Command refers to non-static method
%
s."
%
unicode
(
func
))
# check for unexpected keyword arguments
argspec
=
getargspec
(
func
)
if
argspec
.
keywords
is
None
:
# _operation doesn't take ** args
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment