Logo Search packages:      
Sourcecode: zeroinstall-injector version File versions

def zeroinstall::injector::policy::Policy::begin_archive_download (   self,
  download_source,
  success_callback,
  force = False 
)

Start fetching an archive. You should normally call L{begin_impl_download}
instead, since it handles other kinds of retrieval method too.

Definition at line 477 of file policy.py.

00477                                                                                         :
            """Start fetching an archive. You should normally call L{begin_impl_download}
            instead, since it handles other kinds of retrieval method too."""
            from zeroinstall.zerostore import unpack
            mime_type = download_source.type
            if not mime_type:
                  mime_type = unpack.type_from_url(download_source.url)
            if not mime_type:
                  raise SafeException("No 'type' attribute on archive, and I can't guess from the name (%s)" % download_source.url)
            unpack.check_type_ok(mime_type)
            dl = self.handler.get_download(download_source.url, force = force)
            dl.expected_size = download_source.size + (download_source.start_offset or 0)
            dl.on_success.append(success_callback)
            return dl
      
      def begin_icon_download(self, interface, force = False):


Generated by  Doxygen 1.6.0   Back to index