mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 08:33:56 +02:00
dyndnsd: handle potential nil cases detected by sorbet
- including review suggestions from @jgraichen
This commit is contained in:
@@ -15,7 +15,7 @@ module Dyndnsd
|
||||
# @return [void]
|
||||
def load
|
||||
if File.file?(@db_file)
|
||||
@db = JSON.parse(File.open(@db_file, 'r', &:read))
|
||||
@db = JSON.parse(File.read(@db_file, mode: 'r'))
|
||||
else
|
||||
@db = {}
|
||||
end
|
||||
|
Reference in New Issue
Block a user