Permalink
Browse files

Profile passwords are not optional, and not required to delete profiles.

  • Loading branch information...
1 parent 093117c commit f52839ff304d9ea2c691247f55784578b3a43fc9 Mike Dougherty committed Sep 25, 2012
Showing with 3 additions and 15 deletions.
  1. +1 −8 digsby/src/digsbysplash.py
  2. +0 −2 digsby/src/gui/profiledialog.py
  3. +2 −5 digsby/src/plugins/digsby_identity/identity.py
@@ -380,20 +380,13 @@ def OnChoice(self, evt):
identity_obj.password = self.window.GetPassword()
- if not (self.window.GetPassword() or identity_obj.is_valid):
- evt.EventObject.SetSelection(last_choice)
- wx.MessageBox(
- _('Please enter the profile\'s password before removing it.'),
- _('Remove Profile'))
- return
-
if wx.OK == wx.MessageBox(
_('Are you sure you want to delete profile "%s"?' % username),
_('Remove Profile'), wx.OK | wx.CANCEL):
import digsby.digsbylocal as digsbylocal
try:
- hooks.first('digsby.identity.delete', username, self.window.GetPassword(),
+ hooks.first('digsby.identity.delete', username,
raise_hook_exceptions=True)
except digsbylocal.InvalidPassword:
wx.MessageBox(_('Please enter the correct password to delete "%s".' % username),
@@ -85,14 +85,12 @@ def __init__(self, parent, validator = None):
s = wx.BoxSizer(wx.HORIZONTAL)
s.Add(profile_password, 1, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND)
- s.Add(TEXT(_('(optional)')), 0, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND | wx.LEFT | wx.TOP, 5)
aus.Add(s, 1, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND | ALL, 2)
aus.Add(TEXT(_("&Re-Enter Password:")), 0, ALIGN_RIGHT | ALIGN_CENTER_VERTICAL | ALL, 2)
s = wx.BoxSizer(wx.HORIZONTAL)
s.Add(reenter_password, 1, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND)
- s.Add(TEXT(_('(optional)')), 0, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND | wx.LEFT | wx.TOP, 5)
aus.Add(s, 1, ALIGN_LEFT | ALIGN_CENTER_VERTICAL | EXPAND | ALL, 2)
aus.AddGrowableCol(1, 1)
@@ -54,16 +54,13 @@ def load_data(cls, key, default = None):
return active.get(key, default)
@classmethod
- def delete(cls, name, password):
+ def delete(cls, name):
if not cls.exists(name):
# TODO: should this just cleanly return?
# the expected post-conditions of this function are satisfied...
raise digsbylocal.InvalidUsername
- identity = cls(name, password)
- if not identity.is_valid:
- raise digsbylocal.InvalidPassword
-
+ identity = cls(name)
identity.storage.rmtree()
@classmethod

0 comments on commit f52839f

Please sign in to comment.