diff options
Diffstat (limited to 'lognotify.rb')
-rwxr-xr-x | lognotify.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lognotify.rb b/lognotify.rb index 0ed0538..8ab9aa9 100755 --- a/lognotify.rb +++ b/lognotify.rb @@ -66,7 +66,9 @@ end # Count lines in cached log. def count_lines identifier - return File.open(identifier.to_cache_path).readlines.length + File.open(identifier.to_cache_path) do |file| + return file.readlines.length + end end # Retrieve new lines via SSH. |