Code review comment for lp:~cjwatson/launchpad/refactor-cron-germinate

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I'm going through the diff sequentially at the moment; the parts I'm ignoring are the parts that I have nothing to say about. When I get to the end I can give you a very brief formal review. :)

=== added file 'lib/lp/archivepublisher/scripts/generate_extra_overrides.py'

+ def getConfig(self):
+ """Set up a configuration object for this archive."""
+ for archive in self.distribution.all_distro_archives:
+ # We only work on the primary archive.
+ if archive.purpose == ArchivePurpose.PRIMARY:
+ return getPubConfig(archive)
+ else:
+ raise LaunchpadScriptFailure(
+ 'There is no PRIMARY archive for %s' %
+ self.options.distribution)

Why not just use self.distribution.main_archive?

(Also, remember to punctuate that error message!)

« Back to merge proposal