Code review comment for lp:~edwin-grubbs/launchpad/bug-615654-jobqueue-cron-script

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

I realized that I could make process-job-source.py simpler. Here is the diff.

=== modified file 'cronscripts/process-job-source.py'
--- cronscripts/process-job-source.py 2010-09-30 20:39:02 +0000
+++ cronscripts/process-job-source.py 2010-10-01 13:39:54 +0000
@@ -24,12 +24,8 @@
         "For more help, run:\n"
         " cronscripts/process-job-source-groups.py --help")

- def configure(self):
- """Override configs main() is called by run().
-
- It is done here instead of __init__(), so that we get to use its
- option parser.
- """
+ def __init__(self):
+ super(ProcessJobSource, self).__init__()
         if len(self.args) != 1:
             self.parser.print_help()
             sys.exit(1)
@@ -54,5 +50,4 @@

 if __name__ == '__main__':
     script = ProcessJobSource()
- script.configure()
     script.lock_and_run()

« Back to merge proposal