contrib/perf.py
changeset 42063 912d82daeda3
parent 42021 4c700c847aa2
child 42138 caebe5e7f4bd
--- a/contrib/perf.py	Mon Dec 25 05:55:50 2017 -0800
+++ b/contrib/perf.py	Thu Apr 04 17:47:25 2019 -0700
@@ -316,22 +316,22 @@
     limitspec = ui.configlist(b"perf", b"run-limits", [])
     limits = []
     for item in limitspec:
-        parts = item.split('-', 1)
+        parts = item.split(b'-', 1)
         if len(parts) < 2:
-            ui.warn(('malformatted run limit entry, missing "-": %s\n'
+            ui.warn((b'malformatted run limit entry, missing "-": %s\n'
                      % item))
             continue
         try:
-            time_limit = float(parts[0])
+            time_limit = float(pycompat.sysstr(parts[0]))
         except ValueError as e:
-            ui.warn(('malformatted run limit entry, %s: %s\n'
-                     % (e, item)))
+            ui.warn((b'malformatted run limit entry, %s: %s\n'
+                     % (pycompat.bytestr(e), item)))
             continue
         try:
-            run_limit = int(parts[1])
+            run_limit = int(pycompat.sysstr(parts[1]))
         except ValueError as e:
-            ui.warn(('malformatted run limit entry, %s: %s\n'
-                     % (e, item)))
+            ui.warn((b'malformatted run limit entry, %s: %s\n'
+                     % (pycompat.bytestr(e), item)))
             continue
         limits.append((time_limit, run_limit))
     if not limits: