~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/gina.py

  • Committer: Jeroen Vermeulen
  • Date: 2011-08-23 08:35:13 UTC
  • mto: This revision was merged to the branch mainline in revision 13803.
  • Revision ID: jeroen.vermeulen@canonical.com-20110823083513-rt29biu4ou5ee0e4
Cosmetic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
    log.info("Dry run: %s", dry_run)
116
116
    log.info("")
117
117
 
118
 
    if hasattr(PackagePublishingPocket, pocket.upper()):
119
 
        pocket = getattr(PackagePublishingPocket, pocket.upper())
120
 
    else:
 
118
    if not hasattr(PackagePublishingPocket, pocket.upper()):
121
119
        log.error("Could not find a pocket schema for %s", pocket)
122
120
        sys.exit(1)
123
121
 
 
122
    pocket = getattr(PackagePublishingPocket, pocket.upper())
 
123
 
124
124
    if component_override:
125
125
        valid_components = [
126
126
            component.name for component in getUtility(IComponentSet)]
144
144
        sys.exit(1)
145
145
 
146
146
    packages_map = PackagesMap(arch_component_items)
147
 
    importer_handler = ImporterHandler(ztm, distro, distroseries,
148
 
                                       dry_run, kdb, package_root, keyrings,
149
 
                                       pocket, component_override)
 
147
    importer_handler = ImporterHandler(
 
148
        ztm, distro, distroseries, dry_run, kdb, package_root, keyrings,
 
149
        pocket, component_override)
150
150
 
151
 
    import_sourcepackages(packages_map, kdb, package_root, keyrings,
152
 
                          importer_handler)
 
151
    import_sourcepackages(
 
152
        packages_map, kdb, package_root, keyrings, importer_handler)
153
153
    importer_handler.commit()
154
154
 
155
155
    if source_only:
163
163
            log.exception("Database setup required for run on %s", archtag)
164
164
            sys.exit(1)
165
165
 
166
 
    import_binarypackages(packages_map, kdb, package_root, keyrings,
167
 
                          importer_handler)
 
166
    import_binarypackages(
 
167
        packages_map, kdb, package_root, keyrings, importer_handler)
168
168
    importer_handler.commit()
169
169
 
170
170