Skip to content

Commit

Permalink
fixed: check if copy_tree was sucessful #189
Browse files Browse the repository at this point in the history
  • Loading branch information
mh4x0f committed Jul 4, 2022
1 parent 6563749 commit ace49f1
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions wifipumpkin3/core/config/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,23 @@ def create_user_dir_config():
for folder in C.config_dir_packager_data:
if os.path.isdir(folder):
copy_tree(folder, user_config_dir + "/config")
exit(print(

if os.path.isdir(user_config_dir):
print(
display_messages(
"the user config has been create {}, please restart the wp3!".format(
setcolor("sucessfully", color="green")
),
sucess=True,
)
)
exit(0)
print(
display_messages(
"the user config has been create {}, please restart the wp3!".format(
setcolor("sucessfully", color="green")
"the user config has {} been created, please investigate!".format(
setcolor("not", color="red")
),
sucess=True,
error=True,
)
))
)
exit(1)

0 comments on commit ace49f1

Please sign in to comment.