should temporarily fix some weird bug happening
This commit is contained in:
parent
820dc7c5a2
commit
be8364b69c
1 changed files with 7 additions and 3 deletions
|
|
@ -36,9 +36,13 @@ class PhixxyCom(commands.Cog):
|
|||
lines = f.readlines()
|
||||
for line in reversed(lines):
|
||||
if filename in line:
|
||||
prompt = line[line.index("Prompt: ") + 7:line.index("Filename: ")]
|
||||
prompt = ''.join(prompt.rsplit(',', 1)) # Remove the last comma
|
||||
return html.escape(prompt)
|
||||
try:
|
||||
prompt = line[line.index("Prompt: ") + 7:line.index("Filename: ")]
|
||||
prompt = ''.join(prompt.rsplit(',', 1)) # Remove the last comma
|
||||
return html.escape(prompt)
|
||||
except:
|
||||
self.bot.logger.exception("PhixxyCom failed to find prompt from filename")
|
||||
return "Unknown Prompt"
|
||||
return "Unknown Prompt"
|
||||
|
||||
async def upload_sftp(self, local_filename, server_folder, server_filename):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue