From 4675d0efbde1922ef1cdc7d167c821fef6fde4e4 Mon Sep 17 00:00:00 2001 From: Skillet Date: Tue, 1 Aug 2023 23:02:19 -0400 Subject: [PATCH] fixes --- autowl/Cogs/Group.py | 3 ++- simpleFileServer.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autowl/Cogs/Group.py b/autowl/Cogs/Group.py index 0ff9fb5..8810c6e 100644 --- a/autowl/Cogs/Group.py +++ b/autowl/Cogs/Group.py @@ -22,7 +22,8 @@ class Group(commands.Cog, name="group"): await interaction.response.send_message("Whitelist group successfully added/updated") if role.id in self.client.whitelistGrps.keys(): - self.client.whitelistGrps[role.id].squadPerms = perms + if perms is not None: + self.client.whitelistGrps[role.id].squadPerms = perms self.client.whitelistGrps[role.id].updateGroup() else: log.info(f"Adding {role.name} ({role.id}) as a Whitelist role") diff --git a/simpleFileServer.py b/simpleFileServer.py index 10d1c91..182a915 100644 --- a/simpleFileServer.py +++ b/simpleFileServer.py @@ -32,6 +32,7 @@ class serveRA(http.server.SimpleHTTPRequestHandler): try: file = open(grpfile, 'rb') firstline = file.readline().decode('utf-8') + file.seek(0) if firstline.startswith('remotelist='): remote = firstline.split('=')[1].strip() response = requests.get(remote, headers={'Accept': 'text/html,*/*'})