Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pyuci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Turris
pyuci
Commits
2eb7d6cd
Verified
Commit
2eb7d6cd
authored
Feb 05, 2019
by
Karel Koci
🤘
Committed by
Karel Koci
Feb 05, 2019
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
euci/__init__.py
euci/__init__.py
+7
-3
No files found.
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
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