Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The OctoEverywhere Docker Container plugin can be use for:
- [OctoEverywhere Elegoo Connect](https://octoeverywhere.com/elegoo-centauri?source=github_readme_docker) - OctoEverywhere for Elegoo Centauri & Centauri Carbon 3D printers.
- [OctoEverywhere Klipper Companion](https://octoeverywhere.com/?source=github_readme_docker) - OctoEverywhere for Klipper 3D printers.

Our Docker container can be ran on Windows, Linux, Mac, or just about anywhere.
Our Docker container can be run on Windows, Linux, Mac, or just about anywhere.

[Follow our step-by-step setup guide to get started.](https://octoeverywhere.com/getstarted?source=github_readme_install_docker_guide)

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ OE_ENV="${HOME}/octoeverywhere-env"
# The python requirements are for the installer and plugin
# The virtualenv is for our virtual package env we create
# The curl requirement is for some things in this bootstrap script.
# python3-venv is required for teh virtualenv command to fully work.
# python3-venv is required for the virtualenv command to fully work.
# This must stay in sync with the dockerfile package installs
PKGLIST="python3 python3-pip virtualenv python3-venv curl"
# For the Creality OS, we only need to install these.
Expand Down
2 changes: 1 addition & 1 deletion linux_host/networksearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def threadFunc(threadId:int):
with threadLock:
# If successful, add the IP to the found list.
if result.Success():
# Enure we haven't already found the requested number of IPs,
# Ensure we haven't already found the requested number of IPs,
# because then the result list might have already been returned
# and we don't want to mess with it.
if hasFoundRequestedNumberOfIps[0] is True:
Expand Down
3 changes: 1 addition & 2 deletions moonraker_octoeverywhere/uiinjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ def _FindStaticFilesAndGetHash(self):
if not data:
break
sha1.update(data)
#pylint: disable=consider-using-f-string
self.StaticFileHash = "{0}".format(sha1.hexdigest())
self.StaticFileHash = f"{sha1.hexdigest()}"
self.StaticFileHash = self.StaticFileHash[:10]
self.Logger.debug("Static UI Files Hash: "+self.StaticFileHash)

Expand Down
41 changes: 19 additions & 22 deletions octoeverywhere/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,29 +160,26 @@ def __iter__(self):
return iter([])


# Allow the buffer to be sliced.
# TODO - Once we move past PY 3.7, we can use SupportsIndex for the start and end.
def __getslice__(self, start:int, end:int) -> ByteLikeOrMemoryView:
if self._bytes is not None:
return self._bytes[start:end]
elif self._bytearray is not None:
return self._bytearray[start:end]
elif self._memoryview is not None:
return self._memoryview[start:end]
# Allow the buffer to be indexed or sliced.
def __getitem__(self, key:Union[int, slice]) -> Union[int, ByteLikeOrMemoryView]:
if isinstance(key, slice):
if self._bytes is not None:
return self._bytes[key]
elif self._bytearray is not None:
return self._bytearray[key]
elif self._memoryview is not None:
return self._memoryview[key]
else:
raise ValueError("Buffer is empty")
else:
raise ValueError("Buffer is empty")


# Allow the buffer to be indexed.
def __getitem__(self, key:int) -> int:
if self._bytes is not None:
return self._bytes[key]
elif self._bytearray is not None:
return self._bytearray[key]
elif self._memoryview is not None:
return self._memoryview[key]
else:
raise ValueError("Buffer is empty")
if self._bytes is not None:
return self._bytes[key]
elif self._bytearray is not None:
return self._bytearray[key]
elif self._memoryview is not None:
return self._memoryview[key]
else:
raise ValueError("Buffer is empty")


# Allow the buffer to be set.
Expand Down