Skip to content
Snippets Groups Projects
Commit b6b6f255 authored by nkour's avatar nkour
Browse files

no point not to use popen() than popen2() in this context

parent 88b3c95c
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,13 @@ def get_output(app, param=None):
else:
command = app
try:
child_stdin, child_stdout = os.popen2(command)
except ValueError:
child_stdout = os.popen(command)
except:
print 'Plz relax, and let python do the job. Exiting.. :('
sys.exit()
output = child_stdout.readlines()
child_stdout.close()
child_stdin.close()
return output
......@@ -28,7 +27,7 @@ def visit(arg, dirname, names):
path_to_po = os.path.join(dirname, 'gajim.po')
param = '--statistics ' + path_to_po
print path_to_po, 'has:'
get_output('msgfmt', param)
get_output('msgfmt', param) # msgfmt doesn't use stdout?!
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment