Commit 920b5878 authored by Guido Trotter's avatar Guido Trotter
Browse files

Convert ssconf._ReadFile to utils.ReadFile



Making ssconf._ReadFile a wrapper over utils.ReadFile
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
parent 396b5733
......@@ -166,15 +166,11 @@ class SimpleStore(object):
"""
filename = self.KeyToFilename(key)
try:
fh = file(filename, 'r')
try:
data = fh.read(self._MAX_SIZE)
data = data.rstrip('\n')
finally:
fh.close()
data = utils.ReadFile(filename, size=self._MAX_SIZE)
except EnvironmentError, err:
raise errors.ConfigurationError("Can't read from the ssconf file:"
" '%s'" % str(err))
data = data.rstrip('\n')
return data
def WriteFiles(self, values):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment