summaryrefslogtreecommitdiffstats
path: root/QMTest/TestCmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r--QMTest/TestCmd.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index d7b8d94..bff0d6a 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -339,15 +339,12 @@ def is_List(e):
def to_bytes (s):
if isinstance (s, bytes) or bytes is str:
return s
- else:
- return bytes (s, 'utf-8')
+ return bytes (s, 'utf-8')
def to_str (s):
- if bytes is str:
+ if bytes is str or is_String(s):
return s
- elif not is_String(s):
- return str (s, 'utf-8')
- return s
+ return str (s, 'utf-8')
try:
eval('unicode')