Merge pull request #107 from ineffyble/master
Fixed bug where an empty corpus .json would cause archive command to fail
This commit is contained in:
commit
44d16f3b4f
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ module Ebooks
|
|||
|
||||
@client = client || make_client
|
||||
|
||||
if File.exists?(@path)
|
||||
if (File.exists?(@path) && !File.zero?(@path))
|
||||
@filetext = File.read(@path, :encoding => 'utf-8')
|
||||
@tweets = JSON.parse(@filetext, symbolize_names: true)
|
||||
log "Currently #{@tweets.length} tweets for #{@username}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue