All pastes #800511 Raw Edit

Anonymous

public text v1 · immutable
#800511 ·published 2007-11-28 14:42 UTC
rendered paste body
def _update(line_replacement):
  limits_list = limits_conf.readlines()
  newlines = []
  for item in limits_list:
    line_memlock = find_memlock.search(item) #Is the current line the one we want?
    if line_memlock:
      print 'found the line'
      newlines.append(find_memlock.sub(line_replacement, item))
    else:
      print 'this is not the line'
      newlines.append(item)

  print newlines
  limits_conf.seek(0)
  limits_conf.writelines(newlines)