Skip to content

Commit

Permalink
split requires line, slight code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuchome committed May 13, 2014
1 parent d73cc68 commit 8a4cb3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/include/product-creator/kiwi_dialogs.rb
Expand Up @@ -1131,8 +1131,8 @@ def HandleAddEditUser(key, event)
Ops.get_string(group_map, "group", "")
)
if Ops.get_string(user_map, "password", "") != ""
UI.ChangeWidget(Id(:pw1), :Value, Ops.get_string(user_map, "password", ""))
UI.ChangeWidget(Id(:pw2), :Value, Ops.get_string(user_map, "password", ""))
UI.ChangeWidget(Id(:pw1), :Value, user_map["password"])
UI.ChangeWidget(Id(:pw2), :Value, user_map["password"])
end
# popup label
UI.ChangeWidget(Id(:label), :Value, _("Edit User"))
Expand Down
13 changes: 2 additions & 11 deletions src/modules/Kiwi.rb
Expand Up @@ -518,17 +518,8 @@ def WriteConfigXML(_KiwiConfig, task)
gmap,
"user",
Builtins.maplist(Ops.get_list(gmap, "user", [])) do |umap|
encrypted = Ops.get_boolean(umap, "encrypted", false)
Ops.set(
umap,
"password",
Ops.get_boolean(umap, "encrypted", false) ?
Ops.get_string(umap, "password", "") :
crypt_password(Ops.get_string(umap, "password", ""))
)
if Builtins.haskey(umap, "encrypted")
umap = Builtins.remove(umap, "encrypted")
end
umap["password"] = crypt_password(umap["password"]) if (umap["encrypted"] || false)
umap.delete "encrypted"
deep_copy(umap)
end
)
Expand Down

0 comments on commit 8a4cb3b

Please sign in to comment.