Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Programmable RF Attenuator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Programmable RF Attenuator
Commits
18f5c601
Commit
18f5c601
authored
Nov 05, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: fix open by serial or bust!
parent
fd081729
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
oautest
software/lib/oautest
+3
-7
No files found.
software/lib/oautest
View file @
18f5c601
...
@@ -35,13 +35,9 @@ class OauTest(cmd.Cmd):
...
@@ -35,13 +35,9 @@ class OauTest(cmd.Cmd):
pass
pass
def
do_open
(
self
,
arg
):
def
do_open
(
self
,
arg
):
"""open device by serial number"""
"""open device by serial number."""
try
:
serial
=
bytes
(
arg
,
'utf8'
)
if
arg
else
0
serial
=
arg
if
arg
else
0
fd
=
self
.
api
.
oau_att_open
(
serial
)
except
ValueError
as
e
:
print
(
'usage: open [serial]'
)
return
fd
=
self
.
api
.
oau_att_open
(
bytes
(
serial
,
'utf8'
))
if
fd
<
0
:
if
fd
<
0
:
print
(
'cannot open device {}'
.
format
(
serial
))
print
(
'cannot open device {}'
.
format
(
serial
))
return
return
...
...
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