desktopcouch/application/platform/linux/keyring.py needs fixing

Bug #680076 reported by Eric Casteleijn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
High
Unassigned

Bug Description

From review of another branch, which was too big to fix the issues there:

1408 except gnomekeyring.NoKeyringDaemonError:
1409 - logging.warn("There is no keyring to store our admin credentials.")
1410 + logging.warn(
1411 + "There is no keyring to store our admin credentials.")
1412 except gnomekeyring.CancelledError:
1413 - logging.warn("There is no keyring to store our admin credentials.")
1414 + logging.warn(
1415 + "There is no keyring to store our admin credentials.")
1416 except gnomekeyring.IOError:
1417 - logging.warn("There is no keyring to store our admin credentials.")
1418 + logging.warn(
1419 + "There is no keyring to store our admin credentials.")

These should be a single exception clause, rather than repeating the same string N times. If there is intent on providing additional information based on exception time, we should do that instead of just duplicating messages.

2011 except gnomekeyring.NoKeyringDaemonError:
2012 - logging.warn("There is no keyring to store our admin credentials.")
2013 + pass
2014 + ## logging.warn(
2015 + ## "There is no keyring to store our admin credentials.")
2016 except gnomekeyring.CancelledError:
2017 - logging.warn("There is no keyring to store our admin credentials.")
2018 + pass
2019 + ## logging.warn(
2020 + ## "There is no keyring to store our admin credentials.")

2042 except gnomekeyring.NoKeyringDaemonError:
2043 # in this case we do not have a major issue, continue and return
2044 - logging.warn("There is no keyring to store our oauth credentials.")
2045 + pass
2046 + ## logging.warn(
2047 + ## "There is no keyring to store our oauth credentials.")
2048 +
2049 except gnomekeyring.CancelledError:
2050 # in this case we do not have a major issue, continue and return
2051 - logging.warn("There is no keyring to store our admin credentials.")
2052 + pass
2053 + ## logging.warn(
2054 + ## "There is no keyring to store our admin credentials.")

These two sections of code in the tests should also be compressed into single except clauses I think, and should not just comment out code, but either import the logging module or just remove the code.

Note that the logging code was commented out because logging was not imported so it couldn't possibly work, which also means it has no tests.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Manuel, assigned to you since you were the last person to work on this. Please reassign if you're too busy, or find someone better to fix it.

Changed in desktopcouch:
assignee: nobody → Manuel de la Pena (mandel)
Changed in desktopcouch:
status: Triaged → In Progress
Chad Miller (cmiller)
Changed in desktopcouch:
milestone: 1.0 → 1.1
Changed in desktopcouch:
status: In Progress → Confirmed
assignee: Manuel de la Peña (mandel) → nobody
JACQUELINE (ijdisabest)
Changed in desktopcouch:
status: Confirmed → 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.