Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
py-vlcclient
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
py-vlcclient
Commits
b63c9337
Commit
b63c9337
authored
Jun 15, 2012
by
Michael Mayr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added timeout
parent
01619428
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vlcclient.py
vlcclient.py
+3
-2
No files found.
vlcclient.py
View file @
b63c9337
...
...
@@ -31,10 +31,11 @@ import telnetlib
class
VLCClient
(
object
):
"""Connection to a running VLC instance."""
def
__init__
(
self
,
server
,
port
=
4212
,
password
=
"admin"
):
def
__init__
(
self
,
server
,
port
=
4212
,
password
=
"admin"
,
timeout
=
5
):
self
.
server
=
server
self
.
port
=
port
self
.
password
=
password
self
.
timeout
=
timeout
self
.
telnet
=
None
self
.
server_version
=
None
...
...
@@ -43,7 +44,7 @@ class VLCClient(object):
"""Connect to VLC and login"""
assert
self
.
telnet
is
None
,
"connect() called twice"
self
.
telnet
=
telnetlib
.
Telnet
()
self
.
telnet
.
open
(
self
.
server
,
self
.
port
)
self
.
telnet
.
open
(
self
.
server
,
self
.
port
,
self
.
timeout
)
# Parse version
result
=
self
.
telnet
.
expect
([
...
...
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