l.t.s.p.TranslationsImport(LaunchpadCronScript) : class documentation

Part of lp.translations.scripts.po_import View In Hierarchy

Import .po and .pot files attached to Rosetta.
Method __init__ Construct new LaunchpadScript.
Method run Actually run the script, executing zcml and initZopeless.
Method main Import entries from the queue.
Method _describeEntry Identify entry in a human-readable way.
Method _reportOops Register an oops.
Method _registerFailure Note that a queue entry is unusable in some way.
Method _checkEntry Sanity-check entry before importing.
Method _shouldNotify Is person someone we should send notification emails?
Method _importEntry Perform the import of one entry, and notify the uploader.
Method _reportFailures Bulk-report deferred failures as oopses.

Inherited from LaunchpadCronScript:

Method get_last_activity Return the last activity, if any.
Method record_activity Record the successful completion of the script.

Inherited from LaunchpadScript (via LaunchpadCronScript):

Method handle_options Undocumented
Method name Enable subclasses to override with command-line arguments.
Method dbuser Enable subclasses to override with command-line arguments.
Method add_my_options Optionally customize this hook to define your own options.
Method login Super-convenience method that avoids the import.
Method lockfilename Return lockfilename.
Method lockfilepath Undocumented
Method setup_lock Create lockfile.
Method lock_or_die Attempt to lock, and sys.exit(1) if the lock's already taken.
Method unlock Release the lock. Do this before going home.
Method lock_and_run Call lock_or_die(), and then run() the script.
Method _init_zca Initialize the ZCA, this can be overridden for testing purposes.
Method _init_db Initialize the database transaction.
def __init__(self, *args, **kwargs):
Construct new LaunchpadScript.

Name is a short name for this script; it will be used to assemble a lock filename and to identify the logger object.

Use dbuser to specify the user to connect to the database; if not supplied a default will be used.

Specify test_args when you want to override sys.argv. This is useful in test scripts.

ParametersloggerUse this logger, instead of initializing global logging.
def _describeEntry(self, entry):
Identify entry in a human-readable way.
def _reportOops(self, reason, entries, exc_info=None):
Register an oops.
def _registerFailure(self, entry, reason, traceback=False, abort=False):
Note that a queue entry is unusable in some way.
def _checkEntry(self, entry):
Sanity-check entry before importing.
def _shouldNotify(self, person):
Is person someone we should send notification emails?
def _importEntry(self, entry):
Perform the import of one entry, and notify the uploader.
def run(self, *args, **kwargs):
Actually run the script, executing zcml and initZopeless.
def main(self):
Import entries from the queue.
def _reportFailures(self):
Bulk-report deferred failures as oopses.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.