mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Use six.text_type
* Standarizes unicode function between Python 2 and Python 3
This commit is contained in:
parent
abf63d6bbe
commit
ec2fc8d538
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
|
|
||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
|
from six import text_type
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
@ -1216,7 +1216,7 @@ def update_downloadInfoStatus(inputName, status):
|
||||||
|
|
||||||
myDB = nzbToMediaDB.DBConnection()
|
myDB = nzbToMediaDB.DBConnection()
|
||||||
myDB.action("UPDATE downloads SET status=?, last_update=? WHERE input_name=?",
|
myDB.action("UPDATE downloads SET status=?, last_update=? WHERE input_name=?",
|
||||||
[status, datetime.date.today().toordinal(), unicode(inputName)])
|
[status, datetime.date.today().toordinal(), text_type(inputName)])
|
||||||
|
|
||||||
|
|
||||||
def get_downloadInfo(inputName, status):
|
def get_downloadInfo(inputName, status):
|
||||||
|
@ -1224,7 +1224,7 @@ def get_downloadInfo(inputName, status):
|
||||||
|
|
||||||
myDB = nzbToMediaDB.DBConnection()
|
myDB = nzbToMediaDB.DBConnection()
|
||||||
sqlResults = myDB.select("SELECT * FROM downloads WHERE input_name=? AND status=?",
|
sqlResults = myDB.select("SELECT * FROM downloads WHERE input_name=? AND status=?",
|
||||||
[unicode(inputName), status])
|
[text_type(inputName), status])
|
||||||
|
|
||||||
return sqlResults
|
return sqlResults
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue