Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alarm-mail
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
ds
alarm-mail
Commits
e7a4b8c0
Commit
e7a4b8c0
authored
2 years ago
by
Graziano Scalamera
Browse files
Options
Downloads
Patches
Plain Diff
Remove prints
parent
887f5658
No related branches found
Branches containing commit
Tags
1.2.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/AlarmMail.py
+19
-12
19 additions, 12 deletions
src/AlarmMail.py
with
19 additions
and
12 deletions
src/AlarmMail.py
+
19
−
12
View file @
e7a4b8c0
...
...
@@ -172,7 +172,8 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
#print('looping param=' + param)
#print(params)
...
...
@@ -234,8 +235,9 @@ class AlarmMail (PyTango.Device_4Impl):
att_conf_str
+=
'
;
'
+
str
(
att_conf_id
)
+
'
,1,1
'
except
Exception
,
e
:
print
'
Cannot find att_conf_id for
'
,
att
print
e
#print 'Cannot find att_conf_id for ', att
self
.
debug_stream
(
'
Cannot find att_conf_id for
'
+
att
)
#print e
if
len
(
att_conf_str
)
>
0
and
len
(
self
.
egiga_url
)
>
0
:
link
=
self
.
egiga_url
+
'
&start=
'
+
start_date
+
'
&stop=
'
+
stop_date
+
'
&ts=
'
+
att_conf_str
+
'
&show_error=
'
...
...
@@ -255,7 +257,7 @@ class AlarmMail (PyTango.Device_4Impl):
url
=
params
[
'
url
'
]
except
KeyError
,
e
:
url
=
''
print
e
#
print e
handler_text
=
''
handler_html
=
''
try
:
...
...
@@ -285,7 +287,7 @@ class AlarmMail (PyTango.Device_4Impl):
try
:
time_text
=
'
\n
Time:
'
+
params
[
'
time
'
]
time_html
=
'
<br>Time:
'
+
params
[
'
time
'
]
print
time_html
#
print time_html
except
KeyError
,
e
:
time_text
=
''
time_html
=
''
...
...
@@ -362,7 +364,8 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
handler
=
''
...
...
@@ -413,12 +416,13 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
att_list
=
[]
err_list
=
[]
hdbppes
=
''
print
(
params
)
#
print(params)
word
=
'
([a-zA-Z0-9\+\._\*\#\-]+)
'
word2
=
'
([a-zA-Z0-9\+\.\*\#\-]+)
'
m
=
re
.
compile
(
word
+
"
/
"
+
word
+
"
/
"
+
word
+
"
/
"
+
word
).
match
(
params
[
'
name
'
])
...
...
@@ -508,9 +512,10 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
print
(
params
)
#
print(params)
name
=
params
[
'
name
'
]
state
=
params
[
'
state
'
]
...
...
@@ -556,7 +561,8 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
disbled_type
=
''
if
params
[
'
state
'
]
in
[
'
OOSRV
'
]:
...
...
@@ -611,7 +617,8 @@ class AlarmMail (PyTango.Device_4Impl):
prev_key
=
param
.
split
(
'
=
'
,
1
)[
0
]
prev_value
=
param
.
split
(
'
=
'
,
1
)[
1
]
except
IndexError
,
e
:
print
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
#print('Error splitting ' + param + ' pre key=' + prev_key + ' prev_value='+prev_value)
self
.
debug_stream
(
'
Error splitting
'
+
param
+
'
pre key=
'
+
prev_key
+
'
prev_value=
'
+
prev_value
)
params
[
prev_key
]
+=
'
;
'
+
param
handler
=
''
try
:
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment