Skip to content

Commit

Permalink
Final changes for Version 0.2 (STOCD#35)
Browse files Browse the repository at this point in the history
* Added Combat Time to Copy Summary.

* Updated league connector for new backend.

* Update League Connector to use oscr.stobuilds.com (HTTP)

* Updated oscr.stobilds.com to use HTTPS

* Updated README

* Reworded

* Removed word

* Updated README again

* Updated to also reference CLA.

* Moved section down

* Updated Error message on log failure.

* Updated messages again.

* Updated pyproject.toml

* Updated error log reporting in league connector.

* And removed debug print

* Updated version
  • Loading branch information
Kraust authored May 27, 2024
1 parent 89c0a17 commit ec94c6d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
24 changes: 20 additions & 4 deletions OSCRUI/leagueconnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ def upload(self, filename):
lines.append(entry.detail)
reply.setText("\n".join(lines))
except OSCR_django_client.exceptions.ServiceException as e:
reply.setText(str(e))
try:
data = json.loads(e.body)
reply.setText(data.get("detail", "Failed to parse error from server"))
except Exception as e:
reply.setText("Failed to parse error from server")

reply.exec()

Expand All @@ -249,7 +253,11 @@ def download(self, id):
except OSCR_django_client.exceptions.ServiceException as e:
reply = QMessageBox()
reply.setWindowTitle("Open Source Combatlog Reader")
reply.setText(str(e))
try:
data = json.loads(e.body)
reply.setText(data.get("detail", "Failed to parse error from server"))
except Exception as e:
reply.setText("Failed to parse error from server")
reply.exec()

return None
Expand All @@ -261,7 +269,11 @@ def ladders(self):
except OSCR_django_client.exceptions.ServiceException as e:
reply = QMessageBox()
reply.setWindowTitle("Open Source Combatlog Reader")
reply.setText(str(e))
try:
data = json.loads(e.body)
reply.setText(data.get("detail", "Failed to parse error from server"))
except Exception as e:
reply.setText("Failed to parse error from server")
reply.exec()

return None
Expand All @@ -278,7 +290,11 @@ def ladder_entries(self, id, page=1):
except OSCR_django_client.exceptions.ServiceException as e:
reply = QMessageBox()
reply.setWindowTitle("Open Source Combatlog Reader")
reply.setText(str(e))
try:
data = json.loads(e.body)
reply.setText(data.get("detail", "Failed to parse error from server"))
except Exception as e:
reply.setText("Failed to parse error from server")
reply.exec()

return None
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

class Launcher():

version = '2024.05b231'
__version__ = '0.1'
version = '2024.05b270'
__version__ = '0.2'

# holds the style of the app
theme = {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"PySide6>=6.6.0",
"pyqtgraph>=0.13.4",
"numpy>=1.26.1",
"STO-OSCR>=2024.4b20",
"STO-OSCR>=2024.5b270",
"OSCR-django-client>=2024.3b40",
]
requires-python = ">=3.10"
Expand Down

0 comments on commit ec94c6d

Please sign in to comment.