diff --git a/packages/wakatime/HISTORY.rst b/packages/wakatime/HISTORY.rst index 692b519..affe44d 100644 --- a/packages/wakatime/HISTORY.rst +++ b/packages/wakatime/HISTORY.rst @@ -3,6 +3,12 @@ History ------- +2.1.2 (2014-10-07) +++++++++++++++++++ + +- still log heartbeat when something goes wrong while reading num lines in file + + 2.1.1 (2014-09-30) ++++++++++++++++++ diff --git a/packages/wakatime/wakatime/__init__.py b/packages/wakatime/wakatime/__init__.py index d5bb935..53bfe44 100644 --- a/packages/wakatime/wakatime/__init__.py +++ b/packages/wakatime/wakatime/__init__.py @@ -13,7 +13,7 @@ from __future__ import print_function __title__ = 'wakatime' -__version__ = '2.1.1' +__version__ = '2.1.2' __author__ = 'Alan Hamlett' __license__ = 'BSD' __copyright__ = 'Copyright 2014 Alan Hamlett' @@ -122,8 +122,7 @@ def parseConfigFile(configFile): print(traceback.format_exc()) return None except IOError: - if not os.path.isfile(configFile): - print('Error: Could not read from config file ~/.wakatime.cfg') + print(u('Error: Could not read from config file {0}').format(configFile)) return configs diff --git a/packages/wakatime/wakatime/stats.py b/packages/wakatime/wakatime/stats.py index f601aae..c23cb24 100644 --- a/packages/wakatime/wakatime/stats.py +++ b/packages/wakatime/wakatime/stats.py @@ -82,7 +82,7 @@ def number_lines_in_file(file_name): with open(file_name, 'r', encoding='utf-8') as fh: for line in fh: lines += 1 - except IOError: + except: return None return lines