Make cache_dir of launchpad.CrashDatabase configurable

Bug #416804 reported by Markus Korn
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Wishlist
Unassigned

Bug Description

I would like to use python-apport in a script which does frequently check some bugreports of mine. For this it would be handy if the cache_dir of the launchpadlib.launchpad.Launchpad object would be configurable instead of being a temporary dir. This would speed-up my script.

Tags: bitesize
Revision history for this message
Markus Korn (thekorn) wrote :

Also the creation of a tempdir as cache on apport side seems to be redundant as launchpadlib itself takes care of a temporary cache if no cache location is given to the constructor of a Launchpad object.

Changed in apport:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

I cherrypicked Marco's removal of the temporary cache dir handling. Nice to see this being obsolete.

Would an $APPORT_LAUNCHPAD_CACHE environment variable suit your needs? Or how would you like to configure it?

Changed in apport:
importance: Undecided → Wishlist
status: Confirmed → Incomplete
Revision history for this message
Markus Korn (thekorn) wrote :

I personally would like to see in as an argument to the get_crashdb() function, or maybe as optional value in a config file given as the 'conf' argument of this function. But an environment variable would also work for me.

Changed in apport:
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Right, no reason to not do both. So I'll add an env variable and a configuration option.

Changed in apport:
status: Confirmed → Triaged
tags: added: bitesize
Revision history for this message
Martin Pitt (pitti) wrote :

Committed to trunk r1564.

Changed in apport:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.