From 18bf470b63066c26bae68d74be49051f14650f37 Mon Sep 17 00:00:00 2001 From: "Alexey Lavrenuke (load testing)" Date: Thu, 22 Aug 2013 17:23:42 +0400 Subject: [PATCH] catch TimeoutError --- Tank/Plugins/bfg/guns.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tank/Plugins/bfg/guns.py b/Tank/Plugins/bfg/guns.py index d1677ed..4ef9648 100644 --- a/Tank/Plugins/bfg/guns.py +++ b/Tank/Plugins/bfg/guns.py @@ -55,10 +55,13 @@ class SqlGun(AbstractPlugin): httpCode = 200 try: self.engine.execute(missile.replace('%', '%%')).fetchall() + except exc.TimeoutError as e: + self.log.debug("Timeout: %s", e) + errno = 110 except exc.ResourceClosedError as e: pass except exc.SQLAlchemyError as e: - errno = e.orig.args[0] + httpCode = e.orig.args[0] self.log.warn(e.orig.args) rt = int((time.time() - start_time) * 1000) data_item = Sample(