Commit 1e24baee authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

wip

parent dbdb1853
......@@ -172,7 +172,7 @@ class EqueueServer(socketserver.ThreadingUnixStreamServer):
try:
request.send(command)
except:
except Exception:
self.logger.warning("Couldn't respond to %r", request.fileno())
self.close_request(request)
self._runCommandIfNeeded(command, timestamp)
......
......@@ -14,7 +14,7 @@ def get_curl(buffer, url):
result = "OK"
try:
curl.perform()
except:
except Exception:
import traceback
traceback.print_exc(file=sys.stderr)
sys.stderr.flush()
......
......@@ -121,7 +121,7 @@ def runTestSuite(test_suite_title, test_suite_arguments, logger):
parsed_arguments = dict(key.split('=') for key in test_suite_arguments)
test_suite_module = importFrom(test_suite_title)
success = test_suite_module.runTestSuite(**parsed_arguments)
except:
except Exception:
logger.exception('Impossible to run resiliency test:')
success = False
return success
......@@ -285,7 +285,7 @@ def runUnitTest():
test_count=1,
error_count=error_count,
duration=test_duration)
except:
except Exception:
raise
finally:
os.remove(fname)
......@@ -213,7 +213,7 @@ class ERP5TestSuite(SlaprunnerTestSuite):
try:
if "erp5" == self._getCreatedERP5SiteId():
break
except:
except Exception:
self.logger.info("Fail to connect to erp5.... wait a bit longer")
pass
......
......@@ -445,7 +445,7 @@ def svcStopAll(config):
try:
return Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
'stop', 'all']).communicate()[0]
except:
except Exception:
pass
def svcStartAll(config):
......@@ -453,7 +453,7 @@ def svcStartAll(config):
try:
return Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
'start', 'all']).communicate()[0]
except:
except Exception:
pass
def removeInstanceRootDirectory(config):
......@@ -601,7 +601,7 @@ def newSoftware(folder, config, session):
softwareContent = ""
try:
softwareContent = urlopen(software).read()
except:
except Exception:
#Software.cfg and instance.cfg content will be empty
pass
with open(os.path.join(folderPath, config['software_profile']), 'w') as f:
......@@ -799,7 +799,7 @@ def md5sum(file):
break
m.update(data)
return m.hexdigest()
except:
except Exception:
return False
......
......@@ -259,7 +259,7 @@ def getFileLog():
with open(file_path) as f:
content = f.read()
return jsonify(code=1, result=html_escape(content))
except:
except Exception:
return jsonify(code=0, result="Warning: Log file doesn't exist yet or empty log!!")
......@@ -717,7 +717,7 @@ def fileBrowser():
filename)
try:
return send_file(result, attachment_filename=filename, as_attachment=True)
except:
except Exception:
abort(404)
elif opt == 9:
result = file_request.readFile(dir, filename, False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment