Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
a364541d
Commit
a364541d
authored
Sep 26, 2018
by
Markus Mirz
Browse files
fix logger arg parsing list
parent
e7ee65e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Python/Logger.cpp
View file @
a364541d
...
@@ -69,7 +69,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
...
@@ -69,7 +69,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
const
char
*
kwlist
[]
=
{
"component"
,
"attribute"
,
nullptr
};
const
char
*
kwlist
[]
=
{
"component"
,
"attribute"
,
nullptr
};
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"Os
i|ds
"
,
(
char
**
)
kwlist
,
&
pyObj
,
&
attrName
))
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"Os"
,
(
char
**
)
kwlist
,
&
pyObj
,
&
attrName
))
return
nullptr
;
return
nullptr
;
CPS
::
AttributeList
::
Ptr
attrList
;
CPS
::
AttributeList
::
Ptr
attrList
;
...
@@ -99,7 +99,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
...
@@ -99,7 +99,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
self
->
logger
->
addAttribute
(
attrName
,
a
);
self
->
logger
->
addAttribute
(
attrName
,
a
);
}
}
catch
(
const
CPS
::
InvalidAttributeException
&
exp
)
{
catch
(
const
CPS
::
InvalidAttributeException
&
exp
)
{
PyErr_SetString
(
PyExc_TypeError
,
"
First
argument must be a readable attribute"
);
PyErr_SetString
(
PyExc_TypeError
,
"
Second
argument must be a readable attribute"
);
return
nullptr
;
return
nullptr
;
}
}
...
...
Write
Preview
Supports
Markdown
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