Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Refactored try-except block to be more robust in dialogs.py #4383

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ per-file-ignores =
doc/gui/wxpython/example/dialogs.py: F401
gui/scripts/d.wms.py: E501
gui/wxpython/dbmgr/base.py: E722
gui/wxpython/dbmgr/dialogs.py: E722
gui/wxpython/dbmgr/sqlbuilder.py: E722
gui/wxpython/dbmgr/manager.py: E722
gui/wxpython/docs/wxgui_sphinx/conf.py: E402, W291
Expand Down
7 changes: 4 additions & 3 deletions gui/wxpython/dbmgr/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ def GetSQLString(self, updateValues=False):
ctype = columns[name]["ctype"]
value = columns[name]["values"][idx]
id = columns[name]["ids"][idx]
widget = self.FindWindowById(id)
try:
newvalue = self.FindWindowById(id).GetValue()
except:
newvalue = self.FindWindowById(id).GetLabel()
newvalue = widget.GetValue()
except AttributeError:
newvalue = widget.GetLabel()

if newvalue:
try:
Expand Down
Loading