mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 20:22:36 +01:00
Alias: Try to fix UnicodeDecodeError issues.
This commit is contained in:
parent
5691ce58a5
commit
f74d23b9c6
@ -216,10 +216,14 @@ def makeNewAlias(name, alias):
|
|||||||
flexargs = ''
|
flexargs = ''
|
||||||
if biggestDollar and (wildcard or biggestAt):
|
if biggestDollar and (wildcard or biggestAt):
|
||||||
flexargs = _(' at least')
|
flexargs = _(' at least')
|
||||||
if sys.version_info[0] == 2:
|
try:
|
||||||
alias = alias.decode('utf8')
|
doc = format(_('<an alias,%s %n>\n\nAlias for %q.'),
|
||||||
doc =format(_('<an alias,%s %n>\n\nAlias for %q.'),
|
flexargs, (biggestDollar, _('argument')), alias)
|
||||||
flexargs, (biggestDollar, _('argument')), alias)
|
except UnicodeDecodeError:
|
||||||
|
if sys.version_info[0] == 2:
|
||||||
|
alias = alias.decode('utf8')
|
||||||
|
doc = format(_('<an alias,%s %n>\n\nAlias for %q.'),
|
||||||
|
flexargs, (biggestDollar, _('argument')), alias)
|
||||||
f = utils.python.changeFunctionName(f, name, doc)
|
f = utils.python.changeFunctionName(f, name, doc)
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user