Skip to content

Commit

Permalink
Merge pull request #160 from ethanwhite/fix-connection-report
Browse files Browse the repository at this point in the history
Fix connection report
  • Loading branch information
bendmorris committed Jan 31, 2014
2 parents b98e1ea + 2d628b8 commit fe319f8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions app/connect_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,11 @@ class ConfirmPage(TitledPage):
"""The final confirmation page."""
def __init__(self, parent, title, label):
TitledPage.__init__(self, parent, title, label)
self.fields = wx.BoxSizer(wx.VERTICAL)
self.parent = parent

def Draw(self, evt):
if not evt.GetDirection(): return

self.fields.Clear(True)
self.fields = wx.BoxSizer(wx.VERTICAL)

self.values_dict = dict()
connect = self.parent.CONNECTION
for key in connect.option.keys():
Expand All @@ -201,12 +197,12 @@ def Draw(self, evt):
try:
connect.engine.opts = self.values_dict
connect.engine.connect(force_reconnect=True)
message = '''<p><b>Success!</b>Your connection has been saved.</p>
message = '''<p><b>Success!</b> Your connection has been saved.</p>
<p>Click Finish to continue.</p>'''
save_connection(connect.engine.name, self.values_dict)

except Exception as e:
message = message = '''<p><b>Error.</b>There was a problem with your
message = message = '''<p><b>Error.</b> There was a problem with your
connection:</p><p>%s</p>
<p>Click Back to try again, or Cancel.</p>''' % e

Expand All @@ -216,7 +212,5 @@ def Draw(self, evt):
self.message = HtmlWindow(self)
self.message.SetSize((450,400))
self.message.SetHtml(message)
self.fields.Add(self.message, 1, wx.EXPAND)
self.sizer.Add(self.fields)

self.sizer.Add(self.message, 1, wx.EXPAND)
self.sizer.Layout()

0 comments on commit fe319f8

Please sign in to comment.