Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picomon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
arn
picomon
Commits
215d513b
Commit
215d513b
authored
Aug 24, 2014
by
Colomban Wendling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few PEP8 fixes
parent
dcfb047a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
picomon/attrtree.py
picomon/attrtree.py
+1
-1
picomon_watchdog.py
picomon_watchdog.py
+5
-6
No files found.
picomon/attrtree.py
View file @
215d513b
...
...
@@ -22,7 +22,7 @@ class AttrTree(object):
return
self
.
_attrs
[
key
]
def
__setitem__
(
self
,
key
,
value
):
if
not
key
in
self
.
_attrs
:
if
key
not
in
self
.
_attrs
:
raise
KeyError
(
'Key "%s" does not exist'
%
key
)
elif
isinstance
(
self
.
_attrs
[
key
],
AttrTree
):
raise
KeyError
(
'Key "%s" is not settable'
%
key
)
...
...
picomon_watchdog.py
View file @
215d513b
...
...
@@ -9,21 +9,20 @@ from picomon import mails
# launch picomon
retcode
=
subprocess
.
call
([
"python3"
,
"picomon.py"
]
+
sys
.
argv
[
1
:])
# load config file
#
(unprotected, will trigger exceptions if problems but real
picomon beforehand)
# load config file
(unprotected, will trigger exceptions if problems but real
#
picomon beforehand)
configfile
=
"config.py"
if
"-c"
in
sys
.
argv
:
configfile
=
sys
.
argv
[
sys
.
argv
.
index
(
"-c"
)
+
1
]
configfile
=
sys
.
argv
[
sys
.
argv
.
index
(
"-c"
)
+
1
]
if
"--config"
in
sys
.
argv
:
configfile
=
sys
.
argv
[
sys
.
argv
.
index
(
"--config"
)
+
1
]
configfile
=
sys
.
argv
[
sys
.
argv
.
index
(
"--config"
)
+
1
]
sys
.
path
.
append
(
os
.
path
.
dirname
(
configfile
))
filename
=
os
.
path
.
basename
(
configfile
)
filename
=
os
.
path
.
basename
(
configfile
)
base
,
ext
=
os
.
path
.
splitext
(
filename
)
importlib
.
import_module
(
base
)
# send warning
mails
.
send_email
(
config
.
emails
.
watchdog_subject
,
"Picomon exited with status %s"
%
retcode
)
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