~roadmr/canonical-identity-provider/fix-deprecation-warnings-1

« back to all changes in this revision

Viewing changes to src/identityprovider/management/commands/suspend_unverified_accounts.py

  • Committer: Tom Wardill
  • Date: 2018-02-14 14:05:59 UTC
  • mfrom: (1602 work)
  • mto: (1597.1.44 django-1.10)
  • mto: This revision was merged to the branch mainline in revision 1603.
  • Revision ID: tom.wardill@canonical.com-20180214140559-ow5txzwy46nopws2
Merge flake8 changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
            try:
42
42
                emailutils.send_action_required_warning(
43
43
                    account, days_of_warning, self.account_action)
44
 
            except:
 
44
            except Exception:
45
45
                logging.exception('Error while notifying %s for %r:',
46
46
                                  self.action, account)
47
47
            else:
63
63
                                'preferredemail is set.', copied, self.action)
64
64
            try:
65
65
                getattr(account, self.account_action)()
66
 
            except:
 
66
            except Exception:
67
67
                logging.exception('Error while applying %s to %r:',
68
68
                                  self.action, copied)
69
69
            else:
74
74
                        emailutils.send_action_applied_notice(
75
75
                            email, copied.displayname,
76
76
                            days_of_warning, self.account_action)
77
 
                    except:
 
77
                    except Exception:
78
78
                        logging.exception(
79
79
                            'Error while notifying %s to %r:',
80
80
                            self.action, copied)