From 6d6678a348e985cabacae0a984b1de7742403577 Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sun, 15 Nov 2020 18:45:50 +0100 Subject: [PATCH] contrib --- CONTRIBUTIONS.md | 1 + katrain/__main__.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTIONS.md b/CONTRIBUTIONS.md index 9b314ca..3bb1cdd 100644 --- a/CONTRIBUTIONS.md +++ b/CONTRIBUTIONS.md @@ -52,6 +52,7 @@ Many thanks to these additional authors: * "fohristiwhirl" for the Gibo and NGF formats parsing code. * "kaorahi" for bug fixes and SGF parser improvements. * "ajkenny84" for the red-green colourblind theme. +* Lukasz Wierzbowski for the ability to paste urls for sgfs and helping fix alt-gr issues. ## Translators diff --git a/katrain/__main__.py b/katrain/__main__.py index ce31780..3d35056 100644 --- a/katrain/__main__.py +++ b/katrain/__main__.py @@ -403,13 +403,12 @@ class KaTrainGui(Screen, KaTrainBase): self.controls.set_status(f"Ctrl-V pressed but clipboard is empty.", STATUS_INFO) return - url_match = re.match("(?Phttps?://[^\s]+)", clipboard) + url_match = re.match(r"(?Phttps?://[^\s]+)", clipboard) if url_match: - self.log("Recognized url: " + url_match.group()) - + self.log("Recognized url: " + url_match.group(), OUTPUT_INFO) http = urllib3.PoolManager() - response = http.request('GET', url_match.group()) - clipboard = response.data.decode('utf-8') + response = http.request("GET", url_match.group()) + clipboard = response.data.decode("utf-8") try: move_tree = KaTrainSGF.parse_sgf(clipboard)