Skip to content

Commit 399db07

Browse files
Brandon DavisBrandon Davis
Brandon Davis
authored and
Brandon Davis
committed
Fix docker error
1 parent 5a995c2 commit 399db07

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.egg-info/
44
.eggs/
55
.vscode/
6+
.python-version
67
loginpage_error.html
78
venv/
89
kobo_downloads/

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,14 @@ Try enabling debugging. Run `kobodl --debug book get` (for example), which will
214214

215215
## Development
216216

217-
This project uses [Python Poetry](https://python-poetry.org/).
217+
This project uses [Python Poetry](https://python-poetry.org/). I also personally like `pyenv` and the pyenv-virtualenv addon. I install these with homebrew (MacOS).
218218

219219
```bash
220-
pip install poetry
220+
# Optional if you use pyenv
221+
pyenv install 3.11
222+
pyenv virtualenv 3.11 kobo-book-downloader
223+
echo "kobo-book-downloader" >> .python-version
224+
221225
git clone https://github.com/subdavis/kobo-book-downloader
222226
cd kobo-book-downloader
223227
poetry install

kobodl/kobo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import urllib
1111
from enum import Enum
1212
from shutil import copyfile
13-
from typing import Dict, Tuple
13+
from typing import Dict, Tuple, Union
1414

1515
import requests
1616
from bs4 import BeautifulSoup
@@ -73,7 +73,7 @@ def __GetHeaderWithAccessToken(self) -> dict:
7373
headers = {"Authorization": authorization}
7474
return headers
7575

76-
def __CheckActivation(self, activationCheckUrl) -> Tuple[str, str, str] | None:
76+
def __CheckActivation(self, activationCheckUrl) -> Union[Tuple[str, str, str], None]:
7777
response = self.Session.get(activationCheckUrl)
7878
response.raise_for_status()
7979
jsonResponse = response.json()

0 commit comments

Comments
 (0)