summaryrefslogtreecommitdiffstats
path: root/pyload/utils/__init__.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
commit004a80bfaad38f9400e8aebcb8f980353a232295 (patch)
tree1e786d2d14a3040767aac237982544b74a9567cb /pyload/utils/__init__.py
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r--pyload/utils/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py
index 541dedbd8..1c398224f 100644
--- a/pyload/utils/__init__.py
+++ b/pyload/utils/__init__.py
@@ -23,7 +23,7 @@ json_dumps = json.dumps
def chmod(*args):
try:
os.chmod(*args)
- except:
+ except Exception:
pass
@@ -53,7 +53,7 @@ def remove_chars(string, repl):
if type(string) == str:
return string.translate(maketrans("", ""), repl)
elif type(string) == unicode:
- return string.translate(dict([(ord(s), None) for s in repl]))
+ return string.translate(dict((ord(s), None) for s in repl))
def safe_filename(name):