~bigdata-dev/charms/trusty/hdp-accumulo/trunk

« back to all changes in this revision

Viewing changes to hooks/bdutils.py

  • Committer: amir sanjar
  • Date: 2014-09-22 19:45:57 UTC
  • Revision ID: amir.sanjar@canonical.com-20140922194557-ixnisefhq5k0cne0
accumulo add peer relations

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        contents = f.readlines()
105
105
        for l in range(0, len(contents)):
106
106
            if contents[l].startswith(key):
107
 
                contents[l] = key+value+"\n"
 
107
                contents[l] = key+value
108
108
                found = True
109
109
    if not found:
110
110
        log ("*** Key={} not found, adding key+value= {}".format(key,value))
111
 
        contents.append(key+value+"\n")         
 
111
        contents.append(key+value)         
112
112
    with open(filePath, 'wb') as f:
113
113
        f.writelines(contents)
114
114