Mercurial > hg > clwapp
comparison clwapp/clwapp.py @ 3:672addc0c4be
more fixup
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 20 Dec 2011 12:44:40 -0800 |
parents | 79a43cbdf584 |
children | dfcd4dbe4b1c |
comparison
equal
deleted
inserted
replaced
2:79a43cbdf584 | 3:672addc0c4be |
---|---|
52 return response to a GET requst | 52 return response to a GET requst |
53 """ | 53 """ |
54 args = self.command + self.request.GET.keys() | 54 args = self.command + self.request.GET.keys() |
55 process = subprocess.Popen(args, stdout=subprocess.PIPE) | 55 process = subprocess.Popen(args, stdout=subprocess.PIPE) |
56 output = process.communicate()[0] | 56 output = process.communicate()[0] |
57 output = output.decode('utf-8', errors='ignore') | 57 output = output.decode('utf-8', 'ignore') |
58 title = ' '.join([os.path.basename(args[0])] + args[1:]) | 58 title = ' '.join([os.path.basename(args[0])] + args[1:]) |
59 return self.get_response("""<html><head><title>%s</title></head><body><pre> | 59 return self.get_response("""<html><head><title>%s</title></head><body><pre> |
60 %s | 60 %s |
61 </pre></body></html> | 61 </pre></body></html> |
62 """ % (title, output) ) | 62 """ % (title, output) ) |