[REM] core: useless translation mark
I misremembered that `_` would go look for the translation stuff through the stack, but it only goes up to the caller of `_` itself. Since `clean_filename` has no `cr`, `cursor` or `self` that's never going to do anything, and it's thus completely useless. closes odoo/odoo#65534 X-original-commit: ab3122448079d998e88f77704df62d1b1871e918 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
@@ -13,8 +13,6 @@ import zipfile
|
||||
from contextlib import contextmanager
|
||||
from os.path import join as opj
|
||||
|
||||
from .translate import _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
WINDOWS_RESERVED = re.compile(r'''
|
||||
@@ -53,8 +51,8 @@ def clean_filename(name, replacement=''):
|
||||
:rtype: str
|
||||
"""
|
||||
if WINDOWS_RESERVED.match(name):
|
||||
return _("Untitled")
|
||||
return re.sub(r'[^\w_.()\[\] -]+', replacement, name).lstrip('.-') or _("Untitled")
|
||||
return "Untitled"
|
||||
return re.sub(r'[^\w_.()\[\] -]+', replacement, name).lstrip('.-') or "Untitled"
|
||||
|
||||
def listdir(dir, recursive=False):
|
||||
"""Allow to recursively get the file listing following symlinks, returns
|
||||
|
||||
Reference in New Issue
Block a user