Revision 2287b920 lib/http/auth.py

b/lib/http/auth.py
27 27
import base64
28 28
import binascii
29 29

  
30
from ganeti import utils
31 30
from ganeti import compat
32 31
from ganeti import http
33 32

  
......
287 286
    self.options = options
288 287

  
289 288

  
290
def ReadPasswordFile(file_name):
291
  """Reads a password file.
289
def ParsePasswordFile(contents):
290
  """Parses the contents of a password file.
292 291

  
293 292
  Lines in the password file are of the following format::
294 293

  
......
306 305
  """
307 306
  users = {}
308 307

  
309
  for line in utils.ReadFile(file_name).splitlines():
308
  for line in contents.splitlines():
310 309
    line = line.strip()
311 310

  
312 311
    # Ignore empty lines and comments

Also available in: Unified diff