To satisfy PEP8 I propose the following interdiff:

diff --git a/lib/jqueue/exec.py b/lib/jqueue/exec.py
index a9b13af..7ae8304 100644
--- a/lib/jqueue/exec.py
+++ b/lib/jqueue/exec.py
@@ -68,6 +68,7 @@ def main():
     context = masterd.GanetiContext(livelock_name)

     logging.debug("Registering a SIGTERM handler")
+
     def _TermHandler(signum, _frame):
       logging.info("Killed by signal %d", signum)
       context.jobqueue.CancelJob(job_id)



On Thu, Apr 17, 2014 at 4:41 PM, Petr Pudlák <[email protected]> wrote:

> Both done, thanks.
>
>
> On Thu, Apr 17, 2014 at 4:36 PM, Klaus Aehlig <[email protected]> wrote:
>
>> On Thu, Apr 17, 2014 at 03:11:34PM +0200, Petr Pudlak wrote:
>> > They will be used by Luxi daemon to spawn jobs as separate processes.
>> >
>> > The communication protocol between the Luxi daemon and a spawned process
>> > is described in the documentation of module Ganeti.Query.Exec.
>> >
>> > Signed-off-by: Petr Pudlak <[email protected]>
>>
>> > +def _GetMasterInfo():
>> > +  """Retrieves the job id and lock file name from the master process
>> > +
>> > +  This also closes standard input/output
>> > +  """
>>
>> Add empty line at end of doc-string, see
>> http://docs.ganeti.org/ganeti/master/html/dev-codestyle.html#docstrings
>>
>> > +  logging.debug("Opening transport over stdin/out")
>> > +  with contextlib.closing(transport.FdTransport((0, 1))) as trans:
>> > +    logging.debug("Reading job id from the master process")
>> > +    job_id = int(trans.Call(""))
>> > +    logging.debug("Got job id %d", job_id)
>> > +    logging.debug("Reading the livelock name from the master process")
>> > +    livelock_name = livelock.LiveLockName(trans.Call(""))
>> > +    logging.debug("Got livelock %s", livelock_name)
>> > +  return (job_id, livelock_name)
>> > +
>> > +
>> > +def main():
>> > +  logname = pathutils.GetLogFilename("jobs")
>> > +  utils.SetupLogging(logname, "master-daemon", debug=True) # TODO
>>
>> please mention this TODO in issue 708, so that it won't get missed.
>>
>> > +
>> > +  (job_id, livelock_name) = _GetMasterInfo()
>> > +
>> > +  exit_code = 1
>> > +  try:
>> > [...]
>>
>> Rest LGTM.
>>
>> --
>> Klaus Aehlig
>> Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
>> Registergericht und -nummer: Hamburg, HRB 86891
>> Sitz der Gesellschaft: Hamburg
>> Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
>>
>
>

Reply via email to