Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
235c53f1
Commit
235c53f1
authored
Mar 27, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report more exceptions in printcore callbacks
parent
1c76c26c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
printcore.py
printrun/printcore.py
+6
-6
No files found.
printrun/printcore.py
View file @
235c53f1
...
@@ -112,7 +112,7 @@ class printcore():
...
@@ -112,7 +112,7 @@ class printcore():
def
logError
(
self
,
error
):
def
logError
(
self
,
error
):
if
self
.
errorcb
:
if
self
.
errorcb
:
try
:
self
.
errorcb
(
error
)
try
:
self
.
errorcb
(
error
)
except
:
pass
except
:
traceback
.
print_exc
()
else
:
else
:
logging
.
error
(
error
)
logging
.
error
(
error
)
...
@@ -223,7 +223,7 @@ class printcore():
...
@@ -223,7 +223,7 @@ class printcore():
self
.
log
.
append
(
line
)
self
.
log
.
append
(
line
)
if
self
.
recvcb
:
if
self
.
recvcb
:
try
:
self
.
recvcb
(
line
)
try
:
self
.
recvcb
(
line
)
except
:
pass
except
:
traceback
.
print_exc
()
if
self
.
loud
:
logging
.
info
(
"RECV:
%
s"
%
line
.
rstrip
())
if
self
.
loud
:
logging
.
info
(
"RECV:
%
s"
%
line
.
rstrip
())
return
line
return
line
except
SelectError
as
e
:
except
SelectError
as
e
:
...
@@ -279,7 +279,7 @@ class printcore():
...
@@ -279,7 +279,7 @@ class printcore():
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
:
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
:
if
self
.
onlinecb
:
if
self
.
onlinecb
:
try
:
self
.
onlinecb
()
try
:
self
.
onlinecb
()
except
:
pass
except
:
traceback
.
print_exc
()
self
.
online
=
True
self
.
online
=
True
return
return
...
@@ -300,7 +300,7 @@ class printcore():
...
@@ -300,7 +300,7 @@ class printcore():
if
line
.
startswith
(
'ok'
)
and
"T:"
in
line
and
self
.
tempcb
:
if
line
.
startswith
(
'ok'
)
and
"T:"
in
line
and
self
.
tempcb
:
#callback for temp, status, whatever
#callback for temp, status, whatever
try
:
self
.
tempcb
(
line
)
try
:
self
.
tempcb
(
line
)
except
:
pass
except
:
traceback
.
print_exc
()
elif
line
.
startswith
(
'Error'
):
elif
line
.
startswith
(
'Error'
):
self
.
logError
(
line
)
self
.
logError
(
line
)
# Teststrings for resend parsing # Firmware exp. result
# Teststrings for resend parsing # Firmware exp. result
...
@@ -395,7 +395,7 @@ class printcore():
...
@@ -395,7 +395,7 @@ class printcore():
try
:
try
:
self
.
print_thread
.
join
()
self
.
print_thread
.
join
()
except
:
except
:
pass
traceback
.
print_exc
()
self
.
print_thread
=
None
self
.
print_thread
=
None
...
@@ -578,7 +578,7 @@ class printcore():
...
@@ -578,7 +578,7 @@ class printcore():
logging
.
info
(
"SENT:
%
s"
%
command
)
logging
.
info
(
"SENT:
%
s"
%
command
)
if
self
.
sendcb
:
if
self
.
sendcb
:
try
:
self
.
sendcb
(
command
,
gline
)
try
:
self
.
sendcb
(
command
,
gline
)
except
:
pass
except
:
traceback
.
print_exc
()
try
:
try
:
self
.
printer
.
write
(
str
(
command
+
"
\n
"
))
self
.
printer
.
write
(
str
(
command
+
"
\n
"
))
if
self
.
printer_tcp
:
if
self
.
printer_tcp
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment