Commit 521e7c91 authored by Marco Mariani's avatar Marco Mariani

removed useless comments

parent 09748757
......@@ -2,10 +2,6 @@
for slapgrid:
refactor loggers -- maybe reduce their number?
pay attention to mandatory parameters and related dependencies
drop run(*argument_tuple) ?
except Exeption -> StandardError
* enable --debug by default
......@@ -14,9 +10,6 @@ for slapgrid:
instance
software
report
slapos start (NotImplementedError)
slapos stop (NotImplementedError)
slapos destroy (NotImplementedError)
issues:
slapformat --log_file vs cliff --log-file
......
......@@ -141,18 +141,16 @@ def setRunning(pid_file):
"""Creates a pidfile. If a pidfile already exists, we exit"""
logger = logging.getLogger('Slapgrid')
if os.path.exists(pid_file):
# Pid file is present
try:
pid = int(open(pid_file, 'r').readline())
except ValueError:
pid = None
# XXX This could use psutil library.
if pid is not None and os.path.exists("/proc/%s" % pid):
# In case process is present, ignore.
if pid and os.path.exists("/proc/%s" % pid):
logger.info('New slapos process started, but another slapos '
'process is aleady running with pid %s, exiting.' % pid)
sys.exit(10)
logger.info('Existing pid file %r was stale one, overwritten' % pid_file)
logger.info('Existing pid file %r was stale, overwritten' % pid_file)
# Start new process
write_pid(pid_file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment