Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
pyuci
Commits
2eb7d6cd
Verified
Commit
2eb7d6cd
authored
Feb 05, 2019
by
Karel Koci
🤘
Committed by
Karel Koci
Feb 05, 2019
Browse files
euci: try to remove problem with python 2
parent
03c71ec3
Pipeline
#45004
passed with stages
in 34 seconds
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
euci/__init__.py
View file @
2eb7d6cd
...
...
@@ -44,7 +44,7 @@ class EUci(Uci):
__BOOLEAN_FALSE
=
"0"
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
super
(
EUci
,
self
).
__init__
(
*
args
,
**
kwargs
)
def
get_boolean
(
self
,
*
args
):
"""Returns given UCI config as a boolean.
...
...
@@ -60,7 +60,9 @@ class EUci(Uci):
def
set_boolean
(
self
,
*
args
):
"""Sets boolean value to given UCI config.
"""
self
.
set
(
*
(
args
[:
-
1
]),
self
.
__BOOLEAN_TRUE
if
args
[
-
1
]
else
self
.
__BOOLEAN_FALSE
)
nargs
=
list
(
args
)
nargs
[
-
1
]
=
self
.
__BOOLEAN_TRUE
if
nargs
[
-
1
]
else
self
.
__BOOLEAN_FALSE
self
.
set
(
*
nargs
)
def
get_integer
(
self
,
*
args
):
"""Returns given UCI config as an integer.
...
...
@@ -71,4 +73,6 @@ class EUci(Uci):
def
set_integer
(
self
,
*
args
):
"""Sets integer to given UCI config.
"""
self
.
set
(
*
(
args
[:
-
1
]),
str
(
args
[
-
1
]))
nargs
=
list
(
args
)
nargs
[
-
1
]
=
str
(
nargs
[
-
1
])
self
.
set
(
*
nargs
)
Karel Koci
🤘
@kkoci
mentioned in commit
cc60a740
·
May 22, 2019
mentioned in commit
cc60a740
mentioned in commit cc60a740fa5fbd1f3b6002cba00d0610b6c208bc
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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