Skip to content

Commit

Permalink
cooker: Fix parse progress for python3
Browse files Browse the repository at this point in the history
Under python the type conversions can mean there are float values
used for triggering the parse progress events which then fails.
Add an explict int() conversion to ensure the parse events are
generated under python3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
rpurdie committed May 21, 2016
1 parent acac9bf commit 138329c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bb/cooker.py
Expand Up @@ -2020,7 +2020,7 @@ def __init__(self, cooker, filelist, masked):
else:
self.fromcache.append((filename, appends))
self.toparse = self.total - len(self.fromcache)
self.progress_chunk = max(self.toparse / 100, 1)
self.progress_chunk = int(max(self.toparse / 100, 1))

self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
multiprocessing.cpu_count()), len(self.willparse))
Expand Down

0 comments on commit 138329c

Please sign in to comment.