Alon Bar-Lev has posted comments on this change.

Change subject: core: Add executePipeRaw
......................................................................


Patch Set 2:

(4 comments)

is it working for single process?

http://gerrit.ovirt.org/#/c/26213/2/src/otopi/plugin.py
File src/otopi/plugin.py:

Line 370:                         kw['env'] = os.environ
Line 371:                     kw['env'] = kw['env'].copy()
Line 372:                     kw['env'].update(envAppend)
Line 373: 
Line 374:                 if i==0:
spaces around operator, pep8 should alert, please try rhel pep8
Line 375:                     kw['stdin'] = stdin
Line 376:                 else:
Line 377:                     kw['stdin'] = popens[i-1].stdout
Line 378:                     if i<len(popenKwargsList)-1:


Line 377:                     kw['stdin'] = popens[i-1].stdout
Line 378:                     if i<len(popenKwargsList)-1:
Line 379:                         popens[i-1].stdout.close()
Line 380: 
Line 381:                 if i==num-1 and stdout is not None:
len() should be valid at same cost of num
Line 382:                     kw['stdout'] = stdout
Line 383:                 else:
Line 384:                     kw['stdout'] = subprocess.PIPE
Line 385: 


Line 391:             while not finished:
Line 392:                 finished = None not in [
Line 393:                     p.poll() for p in popens
Line 394:                 ]
Line 395:                 if maxwait is not None and waited > maxwait:
maxwait is not correct term, it is max delay intervals?

 finished =  maxwait is not None and waited > maxwait
 if not finished:

?
Line 396:                     finished = True
Line 397:                 if not finished:
Line 398:                     time.sleep(delay)
Line 399:                 waited += 1


Line 410:             'result': [
Line 411:                 {
Line 412:                     'rc': p.returncode,
Line 413:                     'stderr': p.stderr,
Line 414:                 }
I am almost sure this is not working in python-2.6... I use:

 dict([(key, value), (key, value),])
Line 415:                 for p in popens
Line 416:             ],
Line 417:         }
Line 418: 


-- 
To view, visit http://gerrit.ovirt.org/26213
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4a434fbe1308ac2f603b8ae09756354c11138912
Gerrit-PatchSet: 2
Gerrit-Project: otopi
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to