mpdehaan/ansible — pull request #5 by tbielawa (2012-02-24 23:55:50+00:00)
Title: Fix TypeError caused by OptParse taking forks argument as a string when an int is required.

Ansible throws an exception because the multiprocessing module needs to operate on an integer, however the value is read in as a string.

$ ansible -f 10
Traceback (most recent call last):
File "/usr/bin/ansible", line 77, in
result = Cli().runner().run()
File "/usr/lib/python2.7/site-packages/ansible/__init__.py", line 169, in run
pool = multiprocessing.Pool(self.forks)
File "/usr/lib64/python2.7/multiprocessing/__init__.py", line 227, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild)
File "/usr/lib64/python2.7/multiprocessing/pool.py", line 108, in __init__
self._repopulate_pool()
File "/usr/lib64/python2.7/multiprocessing/pool.py", line 162, in _repopulate_pool
for i in range(self._processes - len(self._pool)):
TypeError: unsupported operand type(s) for -: 'str' and 'int'