rrd.py: skip non-files

alfred-data
Nils Schneider 2013-11-23 23:15:49 +01:00
parent a47345d51b
commit 7e498c4197
1 changed files with 3 additions and 0 deletions

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)