Works better with appriopriate template :p

see #201
This commit is contained in:
Antoine Nguyen
2012-02-02 11:12:46 +01:00
parent e4997dda43
commit 6a18f8bd17
3 changed files with 23 additions and 18 deletions
+2 -1
View File
@@ -3,7 +3,6 @@
import os
import time
import datetime
import rrdtool
from django.utils.translation import ugettext as _
from modoboa.lib import parameters
@@ -77,6 +76,8 @@ class Grapher(object):
self.img_rootdir = parameters.get_admin("IMG_ROOTDIR")
def process(self, target, suffix, start, end, tpl=traffic_avg_template):
import rrdtool
rrdfile = "%s/%s.rrd" % (self.rrd_rootdir, target)
if not os.path.exists(rrdfile):
return