Skip to content

Commit

Permalink
Bugfix error with undefined variable 2022.02.17-2
Browse files Browse the repository at this point in the history
Signed-off-by: miigotu <[email protected]>
  • Loading branch information
miigotu committed Feb 17, 2022
1 parent 823f66f commit 8864bed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sickchill"
version = "2022.02.17-1"
version = "2022.02.17-2"
description = 'Automatic Video Library Manager for TV Shows'
license = "GPL-3.0+"

Expand Down
24 changes: 12 additions & 12 deletions sickchill/init_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ def check_req_installed():
# get the packages string from poetry
result, output = subprocess.getstatusoutput(f"cd {pyproject_path.parent} && {sys.executable} -m poetry export -f requirements.txt --without-hashes")

# Clean up the string so no pip errors.
# pip lock file warning removal
output = re.sub(r"Warning.*", "", output)
# SETUPTOOLS_USE_DISTUTILS=stdlib warnings removal if OS and package cause it
output = re.sub(r".*warnings\.warn.*", "", output)
output = re.sub(r".*SetuptoolsDeprecation.*", "", output)
output = clean_output()
output = output.strip().splitlines()

# Synology remove existing upto date packages from update lists
Expand Down Expand Up @@ -219,14 +214,19 @@ def get_os_id():
pass


def clean_output(output: str) -> str:
# clean out Warning line in list (dirty clean)
# pip lock file warning removal
output = re.sub(r"Warning.*", "", output)
# SETUPTOOLS_USE_DISTUTILS=stdlib warnings removal if OS and package cause it
output = re.sub(r".*warnings\.warn.*", "", output)
output = re.sub(r".*SetuptoolsDeprecation.*", "", output)
return output


def pip_install(packages: Union[List[str], str]) -> bool:
if not isinstance(packages, list):
# clean out Warning line in list (dirty clean)
# pip lock file warning removal
packages = re.sub(r"Warning.*", "", packages)
# SETUPTOOLS_USE_DISTUTILS=stdlib warnings removal if OS and package cause it
packages = re.sub(r".*warnings\.warn.*", "", output)
packages = re.sub(r".*SetuptoolsDeprecation.*", "", output)
packages = clean_output(packages)
packages = packages.strip().splitlines()

cmd = [
Expand Down
2 changes: 1 addition & 1 deletion sickchill/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2022.02.17-1"
__version__ = "2022.02.17-2"

0 comments on commit 8864bed

Please sign in to comment.