[oe-commits] [openembedded-core] branch master-next updated: scripts/pybootchartgui: Fix to work with python 3.8

git at git.openembedded.org git at git.openembedded.org
Sun Mar 15 12:04:27 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

The following commit(s) were added to refs/heads/master-next by this push:
     new f1d4ecc  scripts/pybootchartgui: Fix to work with python 3.8
f1d4ecc is described below

commit f1d4ecce7d3968c5e08c268e3329041d4b647cf6
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sun Mar 15 12:03:20 2020 +0000

    scripts/pybootchartgui: Fix to work with python 3.8
    
    time.clock() was removed in python 3.8, use one of its recommended replacements
    to fix failures on python 3.8 systems.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index ef2d3d3..b42dac6 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -18,7 +18,7 @@ import string
 import re
 import sys
 import tarfile
-from time import clock
+import time
 from collections import defaultdict
 from functools import reduce
 
@@ -723,7 +723,7 @@ def get_num_cpus(headers):
 
 def _do_parse(writer, state, filename, file):
     writer.info("parsing '%s'" % filename)
-    t1 = clock()
+    t1 = time.process_time()
     name = os.path.basename(filename)
     if name == "proc_diskstats.log":
         state.disk_stats = _parse_proc_disk_stat_log(file)
@@ -743,7 +743,7 @@ def _do_parse(writer, state, filename, file):
         state.monitor_disk = _parse_monitor_disk_log(file)
     elif not filename.endswith('.log'):
         _parse_bitbake_buildstats(writer, state, filename, file)
-    t2 = clock()
+    t2 = time.process_time()
     writer.info("  %s seconds" % str(t2-t1))
     return state
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list