Revision 682f7601 lib/hypervisor/hv_kvm.py
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)) |
Also available in: Unified diff