Skip to content

Commit

Permalink
Bugfixes 2 (#151)
Browse files Browse the repository at this point in the history
* Update primary objective null scenario

* Fix? find_command and execute_command

* Moving agent name definition
  • Loading branch information
Josh-XT authored Apr 28, 2023
1 parent aa22ca5 commit 9951e4c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

class Commands:
def __init__(self, agent_name: str = "default", load_commands_flag: bool = True):
self.CFG = Config(agent_name)
if load_commands_flag:
self.commands = self.load_commands()
else:
self.commands = []
if agent_name == "undefined":
agent_name = "default"
self.agent_name = self.CFG.AGENT_NAME if agent_name is None else agent_name
self.agent_name = "default"
else:
self.agent_name = agent_name
self.CFG = Config(self.agent_name)
self.agent_folder = self.CFG.create_agent_folder(self.agent_name)
self.agent_config_file = self.CFG.create_agent_config_file(self.agent_folder)

self.agent_config = self.CFG.load_agent_config(self.agent_name)
if load_commands_flag:
self.commands = self.load_commands()
else:
self.commands = []
self.available_commands = self.get_available_commands()

def get_available_commands(self):
Expand Down

0 comments on commit 9951e4c

Please sign in to comment.