comparison hgext/patchbomb.py @ 6548:962eb403165b

replace usage of os.popen() with util.popen() To make this possible, I added a mode parameter to both implementations of util.popen(), defaulting to 'r' (as it does in the Python stdlib).
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 14 Apr 2008 14:34:38 +0200
parents a135374ed5fc
children 53465a7464e2
comparison
equal deleted inserted replaced
6533:65f1b97484be 6548:962eb403165b
402 m['Bcc'] = ', '.join(bcc) 402 m['Bcc'] = ', '.join(bcc)
403 if opts.get('test'): 403 if opts.get('test'):
404 ui.status('Displaying ', m['Subject'], ' ...\n') 404 ui.status('Displaying ', m['Subject'], ' ...\n')
405 ui.flush() 405 ui.flush()
406 if 'PAGER' in os.environ: 406 if 'PAGER' in os.environ:
407 fp = os.popen(os.environ['PAGER'], 'w') 407 fp = util.popen(os.environ['PAGER'], 'w')
408 else: 408 else:
409 fp = ui 409 fp = ui
410 generator = email.Generator.Generator(fp, mangle_from_=False) 410 generator = email.Generator.Generator(fp, mangle_from_=False)
411 try: 411 try:
412 generator.flatten(m, 0) 412 generator.flatten(m, 0)