ó
dÙÉ]c           @   s#   d  Z  d d l m Z d „  Z d S(   sï  
Redirect reports on packages from the Ubuntu Cloud Archive to the
launchpad cloud-archive project.

Copyright (C) 2013 Canonical Ltd.
Author: James Page <james.page@ubuntu.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
iÿÿÿÿ(   t	   packagingc         C   sš   |  j  d ƒ } | s d  S| j ƒ  d } y; d t j | ƒ k rc t j | ƒ d k rc d |  d <n  Wn/ t k
 r• } d t | ƒ k rŒ d  S| ‚ n Xd  S(   Nt   Packagei    s   ~cloudt	   CanonicalsË   {
               "impl": "launchpad",
               "project": "cloud-archive",
               "bug_pattern_url": "http://people.canonical.com/~ubuntu-archive/bugpatterns/bugpatterns.xml",
            }t   CrashDBs   does not exist(   t   gett   splitR    t   get_versiont   get_package_origint
   ValueErrort   str(   t   reportt   uit   packaget   e(    (    s0   /usr/share/apport/general-hooks/cloud_archive.pyt   add_info   s    N(   t   __doc__t   apportR    R   (    (    (    s0   /usr/share/apport/general-hooks/cloud_archive.pyt   <module>   s   