diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-07 10:44:36 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-07 10:44:36 +0200 |
commit | b61e1467ee19ca96782248c0189424334d5980b7 (patch) | |
tree | cb7b7283f725efe9a525e81f535d22cb2a287e54 /module/Utils.py | |
parent | merged (diff) | |
download | pyload-b61e1467ee19ca96782248c0189424334d5980b7.tar.xz |
hooks methods callable via rpc, closed #299
Diffstat (limited to 'module/Utils.py')
-rw-r--r-- | module/Utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
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])) |