no point not to use popen() than popen2() in this context
This commit is contained in:
parent
88b3c95cd4
commit
b6b6f25538
|
@ -8,14 +8,13 @@ def get_output(app, param=None):
|
||||||
else:
|
else:
|
||||||
command = app
|
command = app
|
||||||
try:
|
try:
|
||||||
child_stdin, child_stdout = os.popen2(command)
|
child_stdout = os.popen(command)
|
||||||
except ValueError:
|
except:
|
||||||
print 'Plz relax, and let python do the job. Exiting.. :('
|
print 'Plz relax, and let python do the job. Exiting.. :('
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
output = child_stdout.readlines()
|
output = child_stdout.readlines()
|
||||||
child_stdout.close()
|
child_stdout.close()
|
||||||
child_stdin.close()
|
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ def visit(arg, dirname, names):
|
||||||
path_to_po = os.path.join(dirname, 'gajim.po')
|
path_to_po = os.path.join(dirname, 'gajim.po')
|
||||||
param = '--statistics ' + path_to_po
|
param = '--statistics ' + path_to_po
|
||||||
print path_to_po, 'has:'
|
print path_to_po, 'has:'
|
||||||
get_output('msgfmt', param)
|
get_output('msgfmt', param) # msgfmt doesn't use stdout?!
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue