X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=TLD_Builder%2Frequest.py;h=25ca994b844a9d6a4a9528f8713d473863053f54;hb=9ea122b00e3a99b16246e1e38576916a2e25c0aa;hp=149557a31573e79081a52fd5bc7172ed93d47f8c;hpb=c4d0706eae2dd9530000a8ad8b62188c417c2caa;p=tld-builder.git diff --git a/TLD_Builder/request.py b/TLD_Builder/request.py index 149557a..25ca994 100644 --- a/TLD_Builder/request.py +++ b/TLD_Builder/request.py @@ -8,9 +8,10 @@ import xml.sax.saxutils import fnmatch import os import urllib -import cgi +import html import pytz import tempfile +import subprocess import util import log @@ -329,18 +330,18 @@ class Batch: desc = "SH:
%s
flags: [%s]" % (self.command, ' '.join(self.command_flags)) else: cmd = "/usr/bin/git ls-remote --heads git://git.tld-linux.org/packages/%s 1>/dev/null 2>&1" % (self.spec[:-5]) - r = call(cmd, shell=True) + r = subprocess.call(cmd, shell=True) if r == 0: package_url = "http://git.tld-linux.org/?p=packages/%(package)s.git;a=blob;f=%(spec)s;hb=%(branch)s" % { - 'spec': urllib.quote(self.spec), - 'branch': urllib.quote(self.branch), - 'package': urllib.quote(self.spec[:-5]), + 'spec': urllib.parse.quote(self.spec), + 'branch': urllib.parse.quote(self.branch), + 'package': urllib.parse.quote(self.spec[:-5]), } else: package_url = "http://git.pld-linux.org/gitweb.cgi?p=packages/%(package)s.git;f=%(spec)s;h=%(branch)s;a=shortlog" % { - 'spec': urllib.quote(self.spec), - 'branch': urllib.quote(self.branch), - 'package': urllib.quote(self.spec[:-5]), + 'spec': urllib.parse.quote(self.spec), + 'branch': urllib.parse.quote(self.branch), + 'package': urllib.parse.quote(self.spec[:-5]), } desc = "%(src_rpm)s (%(spec)s -r %(branch)s%(rpmopts)s)" % { 'src_rpm': self.src_rpm, @@ -379,7 +380,7 @@ class Batch: tree_name = '-'.join(bld[:-1]) tree_arch = '-'.join(bld[-1:]) link_pre = "" \ - % (urllib.quote(tree_name), urllib.quote(tree_arch), urllib.quote(bl_name), urllib.quote(rid)) + % (urllib.parse.quote(tree_name), urllib.parse.quote(tree_arch), urllib.parse.quote(bl_name), urllib.parse.quote(rid)) link_post = "" def ftime(s): @@ -398,7 +399,7 @@ class Batch: 'color' : c, 'builder' : b, 'status' : s, - 'tooltip' : cgi.escape(tooltip, True), + 'tooltip' : html.escape(tooltip, True), } + link_post) f.write("%s]\n" % ' '.join(builders))