On 9 December 2011 00:22, Paul Larson <email address hidden> wrote:
> Review: Approve
>
> 65 + if (kw.has_key('timeout')):
> 66 + timeout = kw['timeout']
> 67 + else:
> 68 + timeout = self.proc.timeout
> 69 +
> 70 + if len(args) == 1:
> 71 + logging.debug("expect (%d): '%s'" %(timeout, args[0]))
> 72 + else:
> 73 + logging.debug("expect (%d): '%s'" %(timeout, str(args)))
>
> We should combine these two blocks, no need to have this ambiguous check
> for len(args) == 1 if we just checked whether timeout was specified.
>
> Also, there is a small merge conflict to fix. Otherwise, still looks fine.
> --
>
> https://code.launchpad.net/~le-chi-thu/lava-dispatcher/log_send_and_expect/+merge/84673
> You are the owner of lp:~le-chi-thu/lava-dispatcher/log_send_and_expect.
>
Major args is only one element and Iit will print a string which look
better than to print an array of one element.
Merge conflict is resolved.
>>> args=["hello"]
>>> print "expect '%s'"%args[0]
expect 'hello'
>>> print "expect %s"%str(args)
expect ['hello']
On 9 December 2011 00:22, Paul Larson <email address hidden> wrote:
> Review: Approve key('timeout' )): debug(" expect (%d): '%s'" %(timeout, args[0])) debug(" expect (%d): '%s'" %(timeout, str(args))) /code.launchpad .net/~le- chi-thu/ lava-dispatcher /log_send_ and_expect/ +merge/ 84673
>
> 65 + if (kw.has_
> 66 + timeout = kw['timeout']
> 67 + else:
> 68 + timeout = self.proc.timeout
> 69 +
> 70 + if len(args) == 1:
> 71 + logging.
> 72 + else:
> 73 + logging.
>
> We should combine these two blocks, no need to have this ambiguous check
> for len(args) == 1 if we just checked whether timeout was specified.
>
> Also, there is a small merge conflict to fix. Otherwise, still looks fine.
> --
>
> https:/
> You are the owner of lp:~le-chi-thu/lava-dispatcher/log_send_and_expect.
>