Skip to content

Commit

Permalink
Remove some empty lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jul 2, 2024
1 parent 52aaee2 commit 2f03201
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def websocket_handler(request):
# On reconnect if we are the currently executing client send the current node
if self.client_id == sid and self.last_node_id is not None:
await self.send("executing", { "node": self.last_node_id }, sid)

async for msg in ws:
if msg.type == aiohttp.WSMsgType.ERROR:
logging.warning('ws connection closed with exception %s' % ws.exception())
Expand All @@ -132,9 +132,9 @@ def get_embeddings(self):
async def get_extensions(request):
files = glob.glob(os.path.join(
glob.escape(self.web_root), 'extensions/**/*.js'), recursive=True)

extensions = list(map(lambda f: "/" + os.path.relpath(f, self.web_root).replace("\\", "/"), files))

for name, dir in nodes.EXTENSION_WEB_DIRS.items():
files = glob.glob(os.path.join(glob.escape(dir), '**/*.js'), recursive=True)
extensions.extend(list(map(lambda f: "/extensions/" + urllib.parse.quote(
Expand All @@ -154,7 +154,7 @@ def get_dir_by_type(dir_type):
type_dir = folder_paths.get_output_directory()

return type_dir, dir_type

def compare_image_hash(filepath, image):
# function to compare hashes of two images to see if it already exists, fix to #3465
if os.path.exists(filepath):
Expand All @@ -167,7 +167,7 @@ def compare_image_hash(filepath, image):
f.close()
return a.hexdigest() == b.hexdigest()
return False

def image_upload(post, image_save_function=None):
image = post.get("image")
overwrite = post.get("overwrite")
Expand Down Expand Up @@ -205,7 +205,7 @@ def image_upload(post, image_save_function=None):
filepath = os.path.join(full_output_folder, filename)
i += 1

if not image_is_duplicate:
if not image_is_duplicate:
if image_save_function is not None:
image_save_function(image, post, filepath)
else:
Expand Down

0 comments on commit 2f03201

Please sign in to comment.