From 6ec2bc69a19d637901e943b40a3e3de3c2bf474e Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Sun, 6 Sep 2015 21:33:03 -0700 Subject: [PATCH] tests wakatime project file --- wakatime/session_cache.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wakatime/session_cache.py b/wakatime/session_cache.py index 2f4578f..a2c0f83 100644 --- a/wakatime/session_cache.py +++ b/wakatime/session_cache.py @@ -19,7 +19,7 @@ import traceback try: import sqlite3 HAS_SQL = True -except ImportError: +except ImportError: # pragma: nocover HAS_SQL = False sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'packages')) @@ -47,7 +47,7 @@ class SessionCache(object): """ if not HAS_SQL: - return + return # pragma: nocover try: conn, c = self.connect() c.execute('DELETE FROM session') @@ -57,7 +57,7 @@ class SessionCache(object): c.execute('INSERT INTO session VALUES (:value)', values) conn.commit() conn.close() - except: + except: # pragma: nocover log.error(traceback.format_exc()) @@ -74,7 +74,7 @@ class SessionCache(object): conn, c = self.connect() except: log.error(traceback.format_exc()) - return requests.session() + return requests.session() # pragma: nocover session = None try: