apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00138
[Merge] lp:~townsend/apport/fix-lp1071905 into lp:apport
Christopher Townsend has proposed merging lp:~townsend/apport/fix-lp1071905 into lp:apport.
Commit message:
Add some logic to determine if the Python3 launchpadlib is not available and print out a more meaningful error message when it is not.
Requested reviews:
Apport upstream developers (apport-hackers)
Related bugs:
Bug #1071905 in Apport: "ERROR: The launchpadlib Python module is not installed."
https://bugs.launchpad.net/apport/+bug/1071905
For more details, see:
https://code.launchpad.net/~townsend/apport/fix-lp1071905/+merge/175380
There is no Python3 launchpadlib (python3-launchpadlib), but when running apport-cli, the error message is very misleading and tends to confuse many users.
This fix checks to see if we are indeed just missing the python3-launchpablib and prints out a hopefully more meaningful message. I chose a message that seems to make sense, but I'm open to changing it something else if the reviewer(s) feel necessary.
--
https://code.launchpad.net/~townsend/apport/fix-lp1071905/+merge/175380
Your team Apport upstream developers is requested to review the proposed merge of lp:~townsend/apport/fix-lp1071905 into lp:apport.
=== modified file 'apport/crashdb_impl/launchpad.py'
--- apport/crashdb_impl/launchpad.py 2013-05-13 05:48:25 +0000
+++ apport/crashdb_impl/launchpad.py 2013-07-17 19:23:26 +0000
@@ -129,9 +129,12 @@
if self.__launchpad:
return self.__launchpad
- if Launchpad is None:
+ if Launchpad is None and _python2 is True:
sys.stderr.write('ERROR: The launchpadlib Python module is not installed. This functionality is not available.\n')
sys.exit(1)
+ elif Launchpad is None and _python2 is False:
+ sys.stderr.write('ERROR: The launchpadlib Python3 module (python3-launchpadlib) is not available. This functionality is cannot be used.\n')
+ sys.exit(1)
if self.options.get('launchpad_instance'):
launchpad_instance = self.options.get('launchpad_instance')