Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
bf158927
authored
Oct 31, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get_serial()
parent
776f392c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
context.py
+5
-4
No files found.
context.py
View file @
bf158927
...
...
@@ -2,7 +2,6 @@
to the platform specific one.
"""
import
platform
from
os.path
import
exists
def
_get_virtio_device
():
...
...
@@ -47,11 +46,13 @@ def get_serial():
port
=
r'\\.\COM1'
elif
system
==
"Linux"
:
port
=
"/dev/virtio-ports/agent"
if
exists
(
port
)
:
from
linux.posixvirtio
import
SerialPort
e
lse
:
try
:
open
(
port
,
'rw'
)
.
close
()
e
xcept
(
OSError
,
IOError
)
:
from
twisted.internet.serialport
import
SerialPort
port
=
'/dev/ttyS0'
else
:
from
linux.posixvirtio
import
SerialPort
else
:
raise
NotImplementedError
(
"Platform
%
s is not supported."
,
system
)
return
(
SerialPort
,
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