Subject: [kajongg/Applications/16.12] src: fix another
unicode/bytes problem, happened only with python2



Git commit e9d0aaa2320207ecfb52807c9ef729837b666326 by Wolfgang Rohdewald.
Committed on 13/12/2016 at 07:40.
Pushed by wrohdewald into branch 'Applications/16.12'.

fix another unicode/bytes problem, happened only with python2

M +2 -1 src/kdestub.py

https://commits.kde.org/kajongg/e9d0aaa2320207ecfb52807c9ef729837b666326

diff --git a/src/kdestub.py b/src/kdestub.py
index bcc5cd59..7db950f1 100644
--- a/src/kdestub.py
+++ b/src/kdestub.py
@@ -55,7 +55,7 @@ except ImportError:
# pylint: disable=wildcard-import,unused-wildcard-import
from qt import *

-from common import Internal, Debug, ENGLISHDICT, unicodeString, isPython3
+from common import Internal, Debug, ENGLISHDICT, unicodeString, isPython3,
nativeStringArgs
from util import uniqueList
from statesaver import StateSaver

@@ -90,6 +90,7 @@ def __insertArgs(translatedTemplate, *args):
if '%' in result:
for idx in range(len(args)):
result = result.replace('%%%d' % (idx + 1), '{%d}' % idx)
+ args = nativeStringArgs(args)
result = result.format(*args)
for ignore in ['numid', 'filename', 'interface']:
result = result.replace('<%s>' % ignore, '')



Programming list archiving by: Enterprise Git Hosting