]> git.ozlabs.org Git - hiprofile/blobdiff - scripts/hiprofile
Convert to a python package
[hiprofile] / scripts / hiprofile
index aa1e361bb48f521e994657e5a100480c35e20464..4895937c4c8c205d41efcd140d175baf1d6f1532 100755 (executable)
@@ -2,13 +2,8 @@
 
 import sys, os
 from optparse import OptionParser
-from django.conf import settings
-
 from hiprofile import Report, Connection, write_report
 
-resourcedir = os.path.join(os.path.dirname(__file__),
-                           '..', 'share', 'hiprofile')
-
 default_thresholds = {
     'binary':   '5%',
     'symbol':   '20',
@@ -31,11 +26,6 @@ def main(args):
 
     (options, args) = parser.parse_args()
 
-    # set up django template engine
-    settings.configure(TEMPLATE_LOADERS =
-                ('django.template.loaders.filesystem.load_template_source',),
-            TEMPLATE_DIRS = (resourcedir,))
-
     conn = Connection(options.host)
 
     report = Report.extract(conn, options)
@@ -44,7 +34,7 @@ def main(args):
 
     report.annotate(conn, options)
 
-    write_report(report, resourcedir, options.outdir)
+    write_report(report, options.outdir)
 
 if __name__ == '__main__':
     sys.exit(main(sys.argv))