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

removed useless comments

parent 09748757
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
for slapgrid: for slapgrid:
refactor loggers -- maybe reduce their number? refactor loggers -- maybe reduce their number?
pay attention to mandatory parameters and related dependencies pay attention to mandatory parameters and related dependencies
drop run(*argument_tuple) ?
except Exeption -> StandardError
* enable --debug by default * enable --debug by default
...@@ -14,9 +10,6 @@ for slapgrid: ...@@ -14,9 +10,6 @@ for slapgrid:
instance instance
software software
report report
slapos start (NotImplementedError)
slapos stop (NotImplementedError)
slapos destroy (NotImplementedError)
issues: issues:
slapformat --log_file vs cliff --log-file slapformat --log_file vs cliff --log-file
......
...@@ -141,18 +141,16 @@ def setRunning(pid_file): ...@@ -141,18 +141,16 @@ def setRunning(pid_file):
"""Creates a pidfile. If a pidfile already exists, we exit""" """Creates a pidfile. If a pidfile already exists, we exit"""
logger = logging.getLogger('Slapgrid') logger = logging.getLogger('Slapgrid')
if os.path.exists(pid_file): if os.path.exists(pid_file):
# Pid file is present
try: try:
pid = int(open(pid_file, 'r').readline()) pid = int(open(pid_file, 'r').readline())
except ValueError: except ValueError:
pid = None pid = None
# XXX This could use psutil library. # XXX This could use psutil library.
if pid is not None and os.path.exists("/proc/%s" % pid): if pid and os.path.exists("/proc/%s" % pid):
# In case process is present, ignore.
logger.info('New slapos process started, but another slapos ' logger.info('New slapos process started, but another slapos '
'process is aleady running with pid %s, exiting.' % pid) 'process is aleady running with pid %s, exiting.' % pid)
sys.exit(10) 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 # Start new process
write_pid(pid_file) 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