rrd.py: skip non-files

This commit is contained in:
Nils Schneider 2013-11-23 23:15:49 +01:00
parent a47345d51b
commit 7e498c4197

3
rrd.py
View file

@ -144,6 +144,9 @@ class rrd:
nodeDbFiles = os.listdir(self.dbPath) nodeDbFiles = os.listdir(self.dbPath)
for fileName in nodeDbFiles: for fileName in nodeDbFiles:
if not os.path.isfile(fileName):
continue
nodeName = os.path.basename(fileName).split('.') nodeName = os.path.basename(fileName).split('.')
if nodeName[1] == 'rrd' and not nodeName[0] == "nodes": if nodeName[1] == 'rrd' and not nodeName[0] == "nodes":
self.createNodeGraph(nodeName[0],self.displayTimeNode) self.createNodeGraph(nodeName[0],self.displayTimeNode)