Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
mon_map
Commits
94c846e5
Commit
94c846e5
authored
Dec 10, 2015
by
Sergios Aftsidis
Browse files
Catch exception and continue in graph datasources iteration
parent
82335374
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/utils.py
View file @
94c846e5
...
...
@@ -101,8 +101,12 @@ def graph_for_each_interface(datasources, start='-1d', end='-100'):
dss
=
datasources
[
i
*
2
:
i
*
2
+
2
]
if
dss
:
ifce
=
Ifce
.
objects
.
get
(
pk
=
dss
[
0
].
object_id
)
png
=
dss
[
0
].
graph_set
.
filter
(
type
=
'traffic'
)[
0
].
get_draw_url
()
mon
=
dss
[
0
].
graph_set
.
filter
(
type
=
'traffic'
)[
0
].
get_absolute_url
()
# import pdb; pdb.set_trace()
try
:
png
=
dss
[
0
].
graph_set
.
filter
(
type
=
'traffic'
)[
0
].
get_draw_url
()
mon
=
dss
[
0
].
graph_set
.
filter
(
type
=
'traffic'
)[
0
].
get_absolute_url
()
except
IndexError
:
continue
if
start
and
end
:
png
+=
'%s,%s/'
%
(
start
,
end
)
response
.
update
({
...
...
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