summaryrefslogtreecommitdiffstats
path: root/pyload/Core.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/Core.py
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/Core.py')
-rw-r--r--pyload/Core.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pyload/Core.py b/pyload/Core.py
index b7317cf0f..a555ba3ff 100644
--- a/pyload/Core.py
+++ b/pyload/Core.py
@@ -210,7 +210,7 @@ class Core(object):
if not pid or os.name == "nt": return False
try:
os.kill(pid, 0) # 0 - default signal (does nothing)
- except:
+ except Exception:
return 0
return pid
@@ -241,7 +241,7 @@ class Core(object):
print "pyLoad did not respond"
print "Kill signal was send to process with id %s" % pid
- except:
+ except Exception:
print "Error quitting pyLoad"
@@ -275,7 +275,7 @@ class Core(object):
pass
except KeyboardInterrupt:
print "\nSetup interrupted"
- except:
+ except Exception:
res = False
print_exc()
print "Setup failed"
@@ -285,7 +285,7 @@ class Core(object):
exit()
try: signal.signal(signal.SIGQUIT, self.quit)
- except: pass
+ except Exception: pass
self.config = ConfigParser()
@@ -503,7 +503,7 @@ class Core(object):
subprocess.Popen(check_name, stdout=pipe, stderr=pipe)
return True
- except:
+ except Exception:
if essential:
self.log.info(_("Install %s") % legend)
exit()
@@ -529,7 +529,7 @@ class Core(object):
makedirs(tmp_name)
else:
open(tmp_name, "w")
- except:
+ except Exception:
file_created = False
else:
file_created = False
@@ -578,7 +578,7 @@ class Core(object):
self.addonManager.coreExiting()
- except:
+ except Exception:
if self.debug:
print_exc()
self.log.info(_("error while shutting down"))