summaryrefslogtreecommitdiffstats
path: root/info.cgi
blob: 09fd1a94e4e72fab4f28ac684239e491db8a7985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python

import cgi, cgitb, os, time, urllib, sch
cgitb.enable()

form = cgi.FieldStorage()

if not form.has_key("fname"):
    sch.error("No file name passed to script file")

fname = form["fname"].value

if not sch.valid_fname(fname):
    sch.error("Fuck off!")

sch.print_header("File Info for '%s'" % fname)
sch.run_proc('%s --info "%s/%s" ' % (sch.syrep_binary, sch.repository_directory, fname))
sch.print_footer()