continue
is only allowed within a for
or while
loop. You can easily restructure your function to loop until a valid request.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
try: results2 = pool.map(getyuzhong, word) except Exception, e: print '出问题了' continue 这样式不行的 while True: try: results2 = pool.map(getyuzhong, word) except Exception, e: print '出问题了' continue 这样就可以了 |
