ó
    z#¶g…  ã                   óX   • S SK Jr  SSKJr  SSKJr  S SKJr  Sr " S S\5      r	SS
 jr
g	)é    )Ú
HTMLParseré   )Úutils)Úopen_url)Ú	NoNetworkz2https://buildd.debian.org/build.php?arch=%s&pkg=%sc                   ó<   • \ rS rSrS rS rS rS
S jrS rS r	Sr
g	)ÚBuilddParseré$   c                 óZ   • [         R                  " U 5        0 U l        S U l        SU l        g )NF)r   Ú__init__ÚversionsÚsavedataÚfound_succeeded©Úselfs    Ú7/usr/lib/python3/dist-packages/reportbug/checkbuildd.pyr   ÚBuilddParser.__init__%   s&   € Ü×Ò˜DÔ!ØˆŒØˆŒØ$ˆÕó    c                 óH   • U R                   b  U R                   U-   U l         g g )N©r   )r   Údatas     r   Úhandle_dataÚBuilddParser.handle_data.   s!   € Ø�=‰=Ñ$Ø ŸM™M¨DÑ0ˆD�Mð %r   c                 ó   • SU l         g )NÚ r   r   s    r   Úsave_bgnÚBuilddParser.save_bgn3   s	   € Øˆ�r   c                 ó~   • U R                   nS U l         U(       d"  Ub  SR                  UR                  5       5      nU$ )NÚ )r   ÚjoinÚsplit)r   Úmoder   s      r   Úsave_endÚBuilddParser.save_end6   s3   € Ø�}‰}ˆØˆŒÞ˜Ñ(Ø—8‘8˜DŸJ™J›LÓ)ˆDØˆr   c                 ó2   • US:X  a  U R                  5         g g )NÚtd)r   )r   ÚtagÚattrss      r   Úhandle_starttagÚBuilddParser.handle_starttag=   s   € Ø�$‹;Ø�M‰M�Oð r   c                 óz   • US:X  a5  U R                  5       nU(       a  SUR                  5       ;   a  SU l        g g g g )Nr&   Ú
successfulT)r#   Úlowerr   )r   r'   r   s      r   Úhandle_endtagÚBuilddParser.handle_endtagA   s8   € Ø�$‹;Ø—=‘=“?ˆDÞ˜¨¯
©
«Ó4Ø'+�Õ$ð 5ˆtð r   )r   r   r   N)r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r   r#   r)   r.   Ú__static_attributes__© r   r   r	   r	   $   s    † ò%ò1ò
ôòõ,r   r	   Nc                 óâ   • U(       d  [         R                  " 5       n [        [        X 4-  X15      nU(       d  g[        5       nUR                  U5        UR                  $ ! [         a     gf = f)a¹  
Check if a source package was built successfully on a buildd

The check is not about a specific package version. If `arch` is not
given and there is evidence that any version of the package once
built sucessfully on any architecture, this function returns True.

If `arch` is given, the check is restricted to that architecture.

Parameters
----------
src_package : str
    name of a source package
timeout : int
    connection timeout in seconds
arch : str, optional
    the arch to be checked
http_proxy : str, optional
    Http proxy url to use for connection

Returns
-------
bool
    True if the connection succeeded and the package was found to
    have built successfully, otherwise False
F)r   Úget_archr   Ú
BUILDD_URLr   r	   Úfeedr   )Úsrc_packageÚtimeoutÚarchÚ
http_proxyÚpageÚparsers         r   Úcheck_builtr@   H   sg   € ö6 Ü�~Š~ÓˆðÜœ
 dÐ%8Ñ8¸*ÓNˆö Øä‹^€FØ
‡K�K�Ôà×!Ñ!Ð!øô ó Ùðús   žA! Á!
A.Á-A.)NN)Úhtml.parserr   r   r   Úurlutilsr   Úreportbug.exceptionsr   r8   r	   r@   r5   r   r   Ú<module>rD      s/   ðõ0 #å Ý õð B€
ô!,�:ô !,õH)"r   