contrib
This commit is contained in:
1 parent
a485968696
commit
6d6678a348
2 files changed
+5
-5
No files matched your search
@@ -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
|
||||
|
||||
|
||||
+4
-5
@@ -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("(?P<url>https?://[^\s]+)", clipboard)
|
||||
url_match = re.match(r"(?P<url>https?://[^\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)
|
||||
|
||||
Reference in new issue
Block a user