- commit
- 65a187f2624438b5bb58a84f3a1b766adeb695f6
- parent
- 579f4bfc29aa1c919e59db18404e264ecde784bc
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-05-29 15:14
reuse http connection
Diffstat
M | python/pad/__init__.py | 3 | ++- |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pad/__init__.py b/python/pad/__init__.py
@@ -10,6 +10,7 @@ from . import diff 10 10 11 11 BASE_URL = 'https://via.ce9e.org/hmsg/pad/' 12 12 -1 13 session = requests.Session() 13 14 pads = {} 14 15 15 16 @@ -53,7 +54,7 @@ class Pad: 53 54 self.local_changes = [] 54 55 data = [self.id, 'changes', self.staged_changes] 55 56 try:56 -1 r = requests.post(self.url, json=data)-1 57 r = session.post(self.url, json=data) 57 58 r.raise_for_status() 58 59 except Exception as e: 59 60 print(e)