Skip to content

Commit fd61f55

Browse files
Daniel NunesInfernio
authored andcommitted
Fix deprecated string methods
1 parent aa2841d commit fd61f55

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

Mopy/bash/basher/dialogs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
# =============================================================================
2424

2525
import wx
26-
import string
2726
from . import bEnableWizard, tabInfo, BashFrame
2827
from .constants import colorInfo, settingDefaults, installercons
2928
from .. import bass, balt, bosh, bolt, bush, env
@@ -269,7 +268,7 @@ def __init__(self, parent, title, fileInfo, faces):
269268
self.data = dict((u'%08X %s' % (key,face.pcName),face) for key,face in faces.items())
270269
else:
271270
self.data = faces
272-
self.list_items = sorted(self.data.keys(),key=string.lower)
271+
self.list_items = sorted(self.data.keys(),key=unicode.lower)
273272
#--GUI
274273
super(ImportFaceDialog, self).__init__(parent, title=title)
275274
self.SetSizeHints(550,300)

Mopy/bash/basher/gui_patchers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
# =============================================================================
2424
from __future__ import division
2525
import copy
26-
import string
2726
import re
2827
from operator import itemgetter
2928
import wx
@@ -177,7 +176,7 @@ def OnEditAliases(self):
177176
aliases_text = self.gAliases.text_content
178177
self.aliases.clear()
179178
for line in aliases_text.split(u'\n'):
180-
fields = map(string.strip,line.split(u'>>'))
179+
fields = map(unicode.strip,line.split(u'>>'))
181180
if len(fields) != 2 or not fields[0] or not fields[1]: continue
182181
self.aliases[GPath(fields[0])] = GPath(fields[1])
183182
self.SetAliasText()

Mopy/bash/bosh/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import errno
3434
import os
3535
import re
36-
import string
3736
import struct
3837
import sys
3938
import time
@@ -3024,7 +3023,7 @@ def loadText(self,path):
30243023
def dumpText(self,path,names):
30253024
"""Dump to text file."""
30263025
with path.open('w',encoding='utf-8-sig') as out:
3027-
for name in sorted(names,key=string.lower):
3026+
for name in sorted(names,key=unicode.lower):
30283027
out.write(u'== %s %s\n' % (name,u'='*(75-len(name))))
30293028
out.write(self[name][2].strip())
30303029
out.write(u'\n\n')

Mopy/bash/patcher/patchers/special.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#
2323
# =============================================================================
2424
import copy
25-
import string
2625
from collections import Counter, defaultdict
2726
from itertools import chain
2827
from operator import itemgetter, attrgetter
@@ -248,10 +247,10 @@ def buildPatch(self,log,progress):
248247
cleaned.add(record.eid)
249248
keep(super)
250249
log.setHeader(u'=== '+_(u'Empty %s Sublists') % label)
251-
for eid in sorted(removed,key=string.lower):
250+
for eid in sorted(removed,key=unicode.lower):
252251
log(u'* '+eid)
253252
log.setHeader(u'=== '+_(u'Empty %s Sublists Removed') % label)
254-
for eid in sorted(cleaned,key=string.lower):
253+
for eid in sorted(cleaned,key=unicode.lower):
255254
log(u'* '+eid)
256255

257256
class CBash_ListsMerger(_AListsMerger, CBash_ListPatcher):

0 commit comments

Comments
 (0)