def get(self, filename=None):
    if not filename:
      self.error(404)
      return
    elif not auth.HasPermission(auth.VIEW_PACKAGES):
      self.error(403)
      return

    filename = urllib.unquote(filename)
    p = models.PackageInfo.get_by_key_name(filename)
    if not p:
      self.error(404)
      self.Render(
          'error.html', {'message': 'PackageInfo not found: %s' % filename})
      return

    p.name = p.plist['name']
    p.display_name = p.plist.get('display_name', '')
    p.unattended = p.plist.get('unattended_install')
    p.unattended_uninstall = p.plist.get('unattended_uninstall')
    p.version = p.plist['version']
    force_install_after_date = p.plist.get('force_install_after_date', None)
    if force_install_after_date:
      p.force_install_after_date = datetime.datetime.strftime(
          force_install_after_date, '%Y-%m-%d')
      p.force_install_after_date_time = datetime.datetime.strftime(
          force_install_after_date, '%H:%M')

    if self.request.referrer and self.request.referrer.endswith('proposals'):
      return_address = '/admin/proposals'
      return_title = 'proposals'
    else:
      return_address = '/admin/packages'
      return_title = 'package'

    if self.request.get('plist_xml'):
      self.Render('plist.html',
                  {'report_type': 'packages',
                   'plist_type': 'package_plist',
                   'xml': admin.XmlToHtml(p.plist.GetXml()),
                   'title': 'Plist for %s' % p.name,
                   'raw_xml_link': '/pkgsinfo/%s' % filename,
                  })
    else:
      categories = (
          [x.strip() for x in settings.LIST_OF_CATEGORIES.split(',') if x])
      manifests_and_catalogs_unlocked = (
          p.blob_info or p.plist.get('PackageCompleteURL'))
      data = {
          'pkg': p,
          'report_type': 'package',
          'tracks': common.TRACKS,
          'install_types': common.INSTALL_TYPES,
          'manifest_mod_groups': common.MANIFEST_MOD_GROUPS,
          'approval_required': settings.APPROVAL_REQUIRED,
          'is_admin_user': self.IsAdminUser(),
          'is_support_user': auth.IsSupportUser(),
          'pkg_safe_to_modify': p.IsSafeToModify(),
          'editxml': self.request.get('editxml'),
          'manifests_and_catalogs_unlocked': manifests_and_catalogs_unlocked,
          'return_address': return_address,
          'return_title': return_title,
          'categories': categories}

      self.Render('package.html', data)
A nicely formatted representaion of the exception.
dataset/ETHPy150Open google/simian/src/simian/mac/admin/package.py/Package.get--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/core/exceptions.py/DeclarativeNameError.__str__