[odrs-web/wip/hughsie/openshift: 1/2] Port to Python 3



commit 95576862fb38751e1e5c1c3e83f660e4f3d85dd3
Author: Richard Hughes <richard hughsie com>
Date:   Mon Oct 22 09:24:02 2018 +0100

    Port to Python 3

 app/views_admin.py | 6 +++---
 cron.py            | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/app/views_admin.py b/app/views_admin.py
index 956e58a..716a950 100644
--- a/app/views_admin.py
+++ b/app/views_admin.py
@@ -211,15 +211,15 @@ def utility_processor():
         nr_stars = int(rating / 20)
         tmp = ''
         for i in range(0, nr_stars):
-            tmp += u'★'
+            tmp += '★'
         for i in range(0, 5 - nr_stars):
-            tmp += u'☆'
+            tmp += '☆'
         return tmp
 
     def format_truncate(tmp, length):
         if len(tmp) <= length:
             return tmp
-        return tmp[:length] + u'…'
+        return tmp[:length] + '…'
 
     def format_timestamp(tmp):
         if not tmp:
diff --git a/cron.py b/cron.py
index 9554da3..cd3e1e3 100755
--- a/cron.py
+++ b/cron.py
@@ -4,8 +4,6 @@
 # Copyright (C) 2016-2018 Richard Hughes <richard hughsie com>
 # Licensed under the GNU General Public License Version 3
 
-from __future__ import print_function
-
 import json
 import sys
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]