getprs: Fix the following error using python3
authorSofian Brabez <sbz@6dev.net>
Sat, 2 Nov 2019 01:51:02 +0000 (02:51 +0100)
committersbz <sbz@6dev.net>
Sat, 2 Nov 2019 01:51:02 +0000 (02:51 +0100)
TypeError: unsupported format string passed to DateTime.__format__

getprs.py

index 4a92273db89e79137bebb3df13a6397a728bd5cd..309ea6c510363284a3ff68293ad726d1da9f93c7 100755 (executable)
--- a/getprs.py
+++ b/getprs.py
@@ -25,7 +25,7 @@ query = bz.build_query(
 
 bugs = bz.query(query)
 for bug in sorted(bugs, key=lambda x:x.last_change_time, reverse=True):
-    print("{:10} {:10} {:8} {:60}".format(bug.last_change_time, bug.id,
+    print("{:10} {:10} {:8} {:60}".format(str(bug.last_change_time), bug.id,
                                           bug.status, bug.summary))
 
 print("{} bugs currently opened.".format(len(bugs)))