summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj M <kmayilsa@redhat.com>2014-04-17 18:07:27 +0530
committerBala.FA <barumuga@redhat.com>2014-04-28 16:20:46 +0530
commita8a9f59b7c45f1ddc6692ac94ed13ec303484366 (patch)
treecb0851747aee35bdc85f5285afab4433cdd6968e
parent62a32a2a82abc880d9374ce446dba971849ed8e1 (diff)
snmp: open snmp conf file in READ mode
Open tne snmpmanagers.conf file in READ-ONLY mode. Change-Id: Ifbb487ef5da6e09b1ff0a09cfe2efb0ab10d6ab3 Signed-off-by: Kanagaraj M <kmayilsa@redhat.com>
-rw-r--r--glusternagios/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glusternagios/utils.py b/glusternagios/utils.py
index 414c00f..88ebccf 100644
--- a/glusternagios/utils.py
+++ b/glusternagios/utils.py
@@ -517,7 +517,7 @@ def parseXml(xmldoc, searchStr):
def getsnmpmanagers(path):
listofmanagers = []
- with open(path, "r+") as mangerconfig:
+ with open(path, "r") as mangerconfig:
for line in mangerconfig.readlines():
if line.startswith("#"):
continue