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
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
205
Issues
205
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
74abc59d
Unverified
Commit
74abc59d
authored
Apr 17, 2019
by
Maxime Buquet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save_order, save: config option is not always a string
Signed-off-by:
Maxime “pep” Buquet
<
pep@bouah.net
>
parent
bddca0c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
poezio/config.py
poezio/config.py
+1
-1
poezio/core/commands.py
poezio/core/commands.py
+4
-2
No files found.
poezio/config.py
View file @
74abc59d
...
...
@@ -447,7 +447,7 @@ class Config(RawConfigParser):
RawConfigParser
.
set
(
self
,
section
,
option
,
value
)
if
not
self
.
write_in_file
(
section
,
option
,
value
):
return
(
'Unable to write in the config file'
,
'Error'
)
if
'password'
in
option
and
'eval_password'
not
in
option
:
if
isinstance
(
option
,
str
)
and
'password'
in
option
and
'eval_password'
not
in
option
:
value
=
'********'
return
(
"%s=%s"
%
(
option
,
value
),
'Info'
)
...
...
poezio/core/commands.py
View file @
74abc59d
...
...
@@ -614,7 +614,8 @@ class CommandCore:
theme
.
COLOR_INFORMATION_TEXT
),
})
for
option_name
,
option_value
in
section
.
items
():
if
'password'
in
option_name
and
'eval_password'
not
in
option_name
:
if
isinstance
(
option_name
,
str
)
and
\
'password'
in
option_name
and
'eval_password'
not
in
option_name
:
option_value
=
'********'
lines
.
append
(
'%s
\x19
%s}=
\x19
o%s'
%
...
...
@@ -624,7 +625,8 @@ class CommandCore:
elif
len
(
args
)
==
1
:
option
=
args
[
0
]
value
=
config
.
get
(
option
)
if
'password'
in
option
and
'eval_password'
not
in
option
and
value
is
not
None
:
if
isinstance
(
option
,
str
)
and
\
'password'
in
option
and
'eval_password'
not
in
option
and
value
is
not
None
:
value
=
'********'
if
value
is
None
and
'='
in
option
:
args
=
option
.
split
(
'='
,
1
)
...
...
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