src/modules/actions/license.py
changeset 2219 60ad60f7592c
parent 2205 53d0be594162
child 2294 f0737e5aeae7
equal deleted inserted replaced
2218:f025ba1faae7 2219:60ad60f7592c
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 
    22 
    23 #
    23 #
    24 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
    24 # Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
    25 #
    25 #
    26 
    26 
    27 """module describing a license packaging object
    27 """module describing a license packaging object
    28 
    28 
    29 This module contains the LicenseAction class, which represents a license
    29 This module contains the LicenseAction class, which represents a license
   169                         # License installed already; return its content.
   169                         # License installed already; return its content.
   170                         return opener().read()
   170                         return opener().read()
   171 
   171 
   172                 try:
   172                 try:
   173                         pub = img.get_publisher(pfmri.publisher)
   173                         pub = img.get_publisher(pfmri.publisher)
   174                         return img.transport.get_content(pub, self.hash)
   174                         return img.transport.get_content(pub, self.hash,
       
   175                             fmri=pfmri)
   175                 finally:
   176                 finally:
   176                         img.cleanup_downloads()
   177                         img.cleanup_downloads()
   177 
   178 
   178         def get_local_opener(self, img, pfmri):
   179         def get_local_opener(self, img, pfmri):
   179                 """Return an opener for the license text from the local disk or
   180                 """Return an opener for the license text from the local disk or