From b61e1467ee19ca96782248c0189424334d5980b7 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 7 May 2011 10:44:36 +0200 Subject: hooks methods callable via rpc, closed #299 --- module/Utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/Utils.py') diff --git a/module/Utils.py b/module/Utils.py index fee1dee0f..63ae9488f 100644 --- a/module/Utils.py +++ b/module/Utils.py @@ -7,6 +7,7 @@ import sys import time import re from os.path import join +from string import maketrans def chmod(*args): try: @@ -24,7 +25,7 @@ def decode(string): def removeChars(string, repl): """ removes all chars in repl from string""" if type(string) == str: - return string.translate(None, repl) + return string.translate(maketrans("", ""), repl) elif type(string) == unicode: return string.translate(dict([(ord(s), None) for s in repl])) -- cgit v1.2.3