Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
30977a8b
Commit
30977a8b
authored
6 years ago
by
Ian Bush
Browse files
Options
Downloads
Patches
Plain Diff
Refs #22994 Progress indicator works correctly for errors and exec
parent
b2862611
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qt/python/mantidqt/widgets/codeeditor/interpreter.py
+3
-6
3 additions, 6 deletions
qt/python/mantidqt/widgets/codeeditor/interpreter.py
with
3 additions
and
6 deletions
qt/python/mantidqt/widgets/codeeditor/interpreter.py
+
3
−
6
View file @
30977a8b
...
...
@@ -232,10 +232,7 @@ class PythonFileInterpreterPresenter(QObject):
else
:
code_str
=
editor
.
text
()
line_from
=
0
# Pad code out with empty lines so that reported line numbers
# do not have to be adjusted
padded
=
'
\n
'
*
line_from
+
code_str
return
padded
,
line_from
return
code_str
,
line_from
def
_on_exec_success
(
self
,
task_result
):
self
.
view
.
editor
.
updateCompletionAPI
(
self
.
model
.
generate_calltips
())
...
...
@@ -245,9 +242,9 @@ class PythonFileInterpreterPresenter(QObject):
exc_type
,
exc_value
,
exc_stack
=
task_error
.
exc_type
,
task_error
.
exc_value
,
\
task_error
.
stack
if
hasattr
(
exc_value
,
'
lineno
'
):
lineno
=
exc_value
.
lineno
lineno
=
exc_value
.
lineno
+
self
.
_code_start_offset
elif
exc_stack
is
not
None
:
lineno
=
exc_stack
[
-
1
][
1
]
lineno
=
exc_stack
[
-
1
][
1
]
+
self
.
_code_start_offset
else
:
lineno
=
-
1
sys
.
stderr
.
write
(
self
.
_error_formatter
.
format
(
exc_type
,
exc_value
,
exc_stack
)
+
'
\n
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment