Revision 682f7601
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
235 | 235 |
""" |
236 | 236 |
if os.path.exists(uid_file): |
237 | 237 |
try: |
238 |
uid = int(utils.ReadFile(uid_file)) |
|
238 |
uid = int(utils.ReadOneLineFile(uid_file))
|
|
239 | 239 |
return uid |
240 | 240 |
except EnvironmentError: |
241 | 241 |
logging.warning("Can't read uid file", exc_info=True) |
... | ... | |
634 | 634 |
vnc_pwd = None |
635 | 635 |
if vnc_pwd_file: |
636 | 636 |
try: |
637 |
vnc_pwd = utils.ReadFile(vnc_pwd_file)
|
|
637 |
vnc_pwd = utils.ReadOneLineFile(vnc_pwd_file, strict=True)
|
|
638 | 638 |
except EnvironmentError, err: |
639 | 639 |
raise errors.HypervisorError("Failed to open VNC password file %s: %s" |
640 | 640 |
% (vnc_pwd_file, err)) |
b/lib/utils.py | ||
---|---|---|
601 | 601 |
|
602 | 602 |
""" |
603 | 603 |
try: |
604 |
raw_data = ReadFile(pidfile) |
|
604 |
raw_data = ReadOneLineFile(pidfile)
|
|
605 | 605 |
except EnvironmentError, err: |
606 | 606 |
if err.errno != errno.ENOENT: |
607 | 607 |
logging.exception("Can't read pid file") |
Also available in: Unified diff