Merge lp:~gothicx/apport/cache_dir_remove into lp:~apport-hackers/apport/trunk

Proposed by Marco Rodrigues
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~gothicx/apport/cache_dir_remove
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~gothicx/apport/cache_dir_remove
Reviewer Review Type Date Requested Status
Apport upstream developers Pending
Review via email: mp+11170@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Marco,

Marco Rodrigues [2009-09-03 23:25 -0000]:
> - self.__launchpad = Launchpad(credentials, launchpad_instance, cache_dir)
> + self.__launchpad = Launchpad(credentials, launchpad_instance)

The official documentation says that this needs cache_dir:

  https://help.launchpad.net/API/launchpadlib

Why did you remove it?

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Hi!

It worked without it. Check bug 416804 and Markus Korn comment. Maybe he didn't update the documentation.

> Hello Marco,
>
> Marco Rodrigues [2009-09-03 23:25 -0000]:
> > - self.__launchpad = Launchpad(credentials,
> launchpad_instance, cache_dir)
> > + self.__launchpad = Launchpad(credentials,
> launchpad_instance)
>
> The official documentation says that this needs cache_dir:
>
> https://help.launchpad.net/API/launchpadlib
>
> Why did you remove it?
>
> Martin
>
> --
> Martin Pitt | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/crashdb_impl/launchpad.py'
2--- apport/crashdb_impl/launchpad.py 2009-09-03 18:24:32 +0000
3+++ apport/crashdb_impl/launchpad.py 2009-09-03 23:18:02 +0000
4@@ -72,8 +72,6 @@
5 if self.__launchpad:
6 return self.__launchpad
7
8- cache_dir = tempfile.mkdtemp()
9- atexit.register(shutil.rmtree, cache_dir)
10 if self.options.get('staging') or os.getenv('APPORT_STAGING'):
11 launchpad_instance = STAGING_SERVICE_ROOT
12 else:
13@@ -88,12 +86,12 @@
14 # use existing credentials
15 credentials = Credentials()
16 credentials.load(open(self.auth))
17- self.__launchpad = Launchpad(credentials, launchpad_instance, cache_dir)
18+ self.__launchpad = Launchpad(credentials, launchpad_instance)
19 else:
20 # get credentials and save them
21 try:
22 self.__launchpad = Launchpad.get_token_and_login('apport-collect',
23- launchpad_instance, cache_dir)
24+ launchpad_instance)
25 except HTTPError, e:
26 print >> sys.stderr, 'Error connecting to Launchpad: %s\nYou have to allow "Change anything" privileges.' % str(e)
27 sys.exit(1)
28
29=== modified file 'apport/hookutils.py'
30--- apport/hookutils.py 2009-09-03 14:21:12 +0000
31+++ apport/hookutils.py 2009-09-03 22:56:31 +0000
32@@ -94,7 +94,7 @@
33
34 report['Lspci'] = command_output(['lspci','-vvnn'])
35 report['Lsusb'] = command_output(['lsusb'])
36- report['UdevDb'] = command_output(['udevadm', 'info', '--export-db'])
37+ report['UdevDb'] = command_output(['udevadm', 'info', '--export-db | grep -vi label'])
38
39 dmi_dir = '/sys/class/dmi/id'
40 if os.path.isdir(dmi_dir):

Subscribers

People subscribed via source and target branches