praiskup / FedoraReview

Forked from FedoraReview 3 years ago
Clone

d4206b3 Retain url encoding when parsing specfile Source urls

Authored and Committed by Otto Urpelainen 3 years ago
    Retain url encoding when parsing specfile Source urls
    
    Source urls parsed from specfile are fetched during fedora-review run.
    This can only work reliably if the urls are valid in the specfile
    and they are kept in valid form during processing.
    Thus, call to 'unencode' when the specfile is parsed is removed.
    
    Unencode was there due to rhbz#920376,
    error when percent-encoded url was used as a Python format string.
    A better solution is to escape '%' before calling 'format'.
    
    There was a period of time when unencoded, invalid urls worked,
    because FancyURLopener could still process them.
    Since then, it has been replaced with urllib.request.urlopen,
    at which point things broke.
    
    Resolves #435