Removes len() on empty sequence evaluation

PEP8 suggestes, "For sequences, use the fact that empty sequences are false."

Change-Id: I4c600a7a6230a55328ee46f7c59f340f37abc18f
This commit is contained in:
Zhongyue Luo 2013-05-10 23:15:08 +08:00
parent 4c4c405786
commit df2443d272

View File

@ -123,7 +123,7 @@ def execute(*cmd, **kwargs):
elif isinstance(check_exit_code, int): elif isinstance(check_exit_code, int):
check_exit_code = [check_exit_code] check_exit_code = [check_exit_code]
if len(kwargs): if kwargs:
raise UnknownArgumentError(_('Got unknown keyword args ' raise UnknownArgumentError(_('Got unknown keyword args '
'to utils.execute: %r') % kwargs) 'to utils.execute: %r') % kwargs)