From f01fc5deb9ecdba5918ddf113c62497d5be35dc5 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 1 Aug 2012 16:08:21 +0100 Subject: maint: don't require write access when reading files Change 'r+' to 'r' for open() when just reading. The '+' is uneeded and distracting. Change-Id: I8c611ab6d63e165f86e588992011f73f69565249 --- nova/virt/libvirt/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/virt') diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py index 55bca7996..c954d70ad 100644 --- a/nova/virt/libvirt/utils.py +++ b/nova/virt/libvirt/utils.py @@ -343,7 +343,7 @@ def load_file(path): :param path: File to read """ - with open(path, 'r+') as fp: + with open(path, 'r') as fp: return fp.read() -- cgit