LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0008-Fix-cli-crash-with-Python-3.patch of Package mycroft-core (Project home:alarrosa:packages)

From 36bc976a1cf98b980d41630b6fb15149bb7cf33c Mon Sep 17 00:00:00 2001
From: "Matthew D. Scholefield" <matthew3311999@gmail.com>
Date: Thu, 8 Feb 2018 15:39:02 -0600
Subject: [PATCH 08/13] Fix cli crash with Python 3 This worked in Python 2
 because type(4 / 2) == int but in Python 3 type(4 / 2) == float

---
 mycroft/client/text/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mycroft/client/text/main.py b/mycroft/client/text/main.py
index cd05b9d..350208e 100644
--- a/mycroft/client/text/main.py
+++ b/mycroft/client/text/main.py
@@ -409,7 +409,7 @@ def scroll_log(up, num_lines=None):
 
     # default to a half-page
     if not num_lines:
-        num_lines = size_log_area/2
+        num_lines = size_log_area // 2
 
     if up:
         log_line_offset -= num_lines
-- 
2.16.2