Skip to content

Commit 6cea9f7

Browse files
authored
Merge pull request #161 from zcyph/qrcode
switch qrencode to qrcode
2 parents 16779c1 + b74fa19 commit 6cea9f7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.drone.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ local default_deps = [
1616
'python3-pil',
1717
'python3-protobuf',
1818
'python3-openssl',
19-
'python3-qrencode',
19+
'python3-qrcode',
2020
'python3-better-profanity',
2121
'python3-sqlalchemy',
2222
'python3-sqlalchemy-utils',

install-uwsgi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Python using:
2828
sudo curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
2929
echo "deb https://deb.oxen.io $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/oxen.list
3030
sudo apt update
31-
sudo apt install python3-{oxenmq,oxenc,pyonionreq,coloredlogs,uwsgidecorators,flask,cryptography,nacl,pil,protobuf,openssl,qrencode,better-profanity,sqlalchemy,sqlalchemy-utils} uwsgi-plugin-python3
31+
sudo apt install python3-{oxenmq,oxenc,pyonionreq,coloredlogs,uwsgidecorators,flask,cryptography,nacl,pil,protobuf,openssl,qrcode,better-profanity,sqlalchemy,sqlalchemy-utils} uwsgi-plugin-python3
3232
```
3333

3434
If you want to use a postgresql database backend then you will also need the python3-psycopg2

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ install_requires=
1616
Pillow
1717
protobuf
1818
pyOpenSSL
19-
qrencode
19+
qrcode
2020
better_profanity
2121
oxenmq
2222
oxenc

sogs/routes/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from io import BytesIO
99

10-
import qrencode
10+
import qrcode
1111

1212
import PIL.Image
1313

@@ -61,8 +61,8 @@ def serve_invite_qr(room):
6161
if not room.default_read:
6262
abort(http.FORBIDDEN)
6363

64-
img = qrencode.encode(room.url)
64+
img = qrcode.make(room.url)
6565
data = BytesIO()
66-
img = img[-1].resize((512, 512), NEAREST)
66+
img = img.resize((512, 512), NEAREST)
6767
img.save(data, "PNG")
6868
return Response(data.getvalue(), mimetype="image/png")

0 commit comments

Comments
 (0)