mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Merge branch 'dev' into 'master'
Fix user reset password. Fix NL language See merge request crafty-controller/crafty-4!335
This commit is contained in:
commit
5022723895
@ -60,14 +60,16 @@ class MainPrompt(cmd.Cmd):
|
|||||||
def do_set_passwd(self, line):
|
def do_set_passwd(self, line):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
username = str(line).lower()
|
username = line
|
||||||
# If no user is found it returns None
|
# If no user is found it returns None
|
||||||
user_id = self.controller.users.get_id_by_name(username)
|
user_id = self.controller.users.get_id_by_name(username)
|
||||||
if not username:
|
if not username:
|
||||||
Console.error("You must enter a username. Ex: `set_passwd admin'")
|
Console.error("You must enter a username. Ex: `set_passwd admin'")
|
||||||
return False
|
return False
|
||||||
if not user_id:
|
if not user_id:
|
||||||
Console.error(f"No user found by the name of {username}")
|
Console.error(
|
||||||
|
f"No user found by the name of {username} this is case sensitive"
|
||||||
|
)
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
Console.error(f"User: {line} Not Found")
|
Console.error(f"User: {line} Not Found")
|
||||||
|
@ -541,9 +541,12 @@ class ServerInstance:
|
|||||||
f"Server {self.name} has crash detection enabled "
|
f"Server {self.name} has crash detection enabled "
|
||||||
"- starting watcher task"
|
"- starting watcher task"
|
||||||
)
|
)
|
||||||
self.server_scheduler.add_job(
|
try:
|
||||||
self.detect_crash, "interval", seconds=30, id=f"c_{self.server_id}"
|
self.server_scheduler.add_job(
|
||||||
)
|
self.detect_crash, "interval", seconds=30, id=f"c_{self.server_id}"
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
logger.info(f"Job with id c_{self.server_id} already running...")
|
||||||
|
|
||||||
def stop_threaded_server(self):
|
def stop_threaded_server(self):
|
||||||
self.stop_server()
|
self.stop_server()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user