Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
ce83ac7b
Commit
ce83ac7b
authored
Nov 28, 2013
by
Francois Keith
Browse files
Handle the unlikely case where an entity has no signal.
parent
ec70c041
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dynamic_graph/entity.py
View file @
ce83ac7b
...
...
@@ -112,10 +112,13 @@ class Entity (object) :
Print the list of signals into standard output: temporary.
"""
signals
=
self
.
signals
()
display
(
"--- <"
+
self
.
name
+
"> signal list: "
)
for
s
in
signals
[:
-
1
]:
display
(
" |-- <"
+
str
(
s
))
display
(
" `-- <"
+
str
(
signals
[
-
1
]))
if
len
(
signals
)
==
0
:
display
(
"--- <"
+
self
.
name
+
"> has no signal"
)
else
:
display
(
"--- <"
+
self
.
name
+
"> signal list: "
)
for
s
in
signals
[:
-
1
]:
display
(
" |-- <"
+
str
(
s
))
display
(
" `-- <"
+
str
(
signals
[
-
1
]))
def
signals
(
self
)
:
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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