def _collect_env(self, env): items = [ ('Dist', get_dist()), ('Arch', get_arch()), ('IP', get_local_ipv4()), ] target = env.query_target() if target: items.append(('Target', str(target))) return items
def transform_url(url): if not url: url = settings.UPLOAD_URL if re.search(r'%\(.*?\)s', url): data = {'date': time.strftime('%Y%m%d'), 'dist': get_dist(), 'arch': get_arch(), } return url % data return url