Permalink
Browse files

If we have jobs=1 to indicate one process we need chunksize to be one…

… as well
  • Loading branch information...
1 parent 96adee9 commit 00307160b0743c61b02350d9c8afcbc4f067f9bc dhubbard committed Aug 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 sshmap/sshmap.py
View
@@ -486,7 +486,7 @@ def run(host_range, command, username=None, password=None, sudo=False,
pool = multiprocessing.Pool(processes=jobs, initializer=init_worker)
if not chunksize:
- if jobs >= len(hosts):
+ if jobs == 1 or jobs >= len(hosts):
chunksize = 1
else:
chunksize = int(len(hosts) / jobs) - 1

0 comments on commit 0030716

Please sign in to comment.