We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac959d6 commit c497fadCopy full SHA for c497fad
pyqt-calculator-tutorial/pycalc/pycalc.py
@@ -114,7 +114,7 @@ def evaluateExpression(expression):
114
"""Evaluate an expression."""
115
try:
116
result = str(eval(expression, {}, {}))
117
- except:
+ except Exception:
118
result = ERROR_MSG
119
120
return result
@@ -165,7 +165,7 @@ def main():
165
view.show()
166
# 7. Create an instance of the model, and the controller
167
model = evaluateExpression
168
- ctrl = PyCalcCtrl(model=model, view=view)
+ PyCalcCtrl(model=model, view=view)
169
# 8. Execute calculator's main loop
170
sys.exit(pycalc.exec_())
171
0 commit comments