Exemplo n.º 1
0
 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
Exemplo n.º 2
0
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