Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
b86340cd
Commit
b86340cd
authored
Oct 26, 2017
by
Wolfgang Rohdewald
Browse files
remove unused xToUtf8
parent
7f38ce35
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util.py
View file @
b86340cd
...
...
@@ -217,25 +217,6 @@ def gitHead():
return
'current'
if
uncommitted
else
next
(
popenReadlines
(
'git log -1 --format=%h'
))
def
xToUtf8
(
msg
,
args
=
None
):
"""makes sure msg and all args are utf-8"""
return
(
msg
,
args
)
if
args
is
not
None
else
msg
# TODO: dead code
if
isinstance
(
msg
,
str
):
msg
=
msg
.
encode
(
'utf-8'
)
elif
not
isinstance
(
msg
,
bytes
):
msg
=
str
(
msg
).
encode
(
'utf-8'
)
if
args
is
not
None
:
args
=
list
(
args
[:])
for
idx
,
arg
in
enumerate
(
args
):
if
isinstance
(
arg
,
str
):
args
[
idx
]
=
arg
.
encode
(
'utf-8'
)
elif
not
isinstance
(
arg
,
bytes
):
args
[
idx
]
=
str
(
arg
).
encode
(
'utf-8'
)
return
msg
,
args
return
msg
class
CsvWriter
:
"""hide differences between Python 2 and 3"""
def
__init__
(
self
,
filename
,
mode
=
'w'
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment