We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d45c90 commit e15188bCopy full SHA for e15188b
script.py
@@ -3,6 +3,7 @@
3
import sys
4
5
from edge_addons_api.client import Client, Options
6
+from edge_addons_api.exceptions import UploadException
7
8
if len(sys.argv) < 3:
9
print("You must provide file_path and notes")
@@ -23,4 +24,19 @@
23
24
25
client = Client(options)
26
-client.submit(file_path=file_path, notes=notes)
27
+print("Submitting addon")
28
+
29
+try:
30
+ client.submit(file_path=file_path, notes=notes)
31
32
+ print("Successfully uploaded addon")
33
+except UploadException as e:
34
+ print(f"Failed to upload: {e.status} - {e.error_code} - {e.message}")
35
+ print(f"Errors:")
36
+ for error in e.errors:
37
+ print(f"- {error['message']}")
38
39
+ sys.exit(1)
40
+except BaseException as e:
41
+ print(f"failed to upload: {e}")
42
0 commit comments