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
22eb0baa
Commit
22eb0baa
authored
Jun 02, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix disconnect action for TCP connections
parent
a5c5a924
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
printcore.py
printcore.py
+2
-0
No files found.
printcore.py
View file @
22eb0baa
...
@@ -123,8 +123,10 @@ class printcore():
...
@@ -123,8 +123,10 @@ class printcore():
if
not
is_serial
:
if
not
is_serial
:
self
.
printer_tcp
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
printer_tcp
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
timeout
=
0.25
self
.
timeout
=
0.25
self
.
printer_tcp
.
settimeout
(
1.0
)
try
:
try
:
self
.
printer_tcp
.
connect
((
hostname
,
port
))
self
.
printer_tcp
.
connect
((
hostname
,
port
))
self
.
printer_tcp
.
settimeout
(
self
.
timeout
)
self
.
printer
=
self
.
printer_tcp
.
makefile
()
self
.
printer
=
self
.
printer_tcp
.
makefile
()
except
socket
.
error
:
except
socket
.
error
:
print
_
(
"Could not connect to
%
s:
%
s:"
)
%
(
hostname
,
port
)
print
_
(
"Could not connect to
%
s:
%
s:"
)
%
(
hostname
,
port
)
...
...
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