summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samloader/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/samloader/main.py b/samloader/main.py
index 48c9a82..eba0dc0 100644
--- a/samloader/main.py
+++ b/samloader/main.py
@@ -88,7 +88,9 @@ def getbinaryfile(client, fw, model, region):
status = int(root.find("./FUSBody/Results/Status").text)
if status != 200:
raise Exception("DownloadBinaryInform returned {}, firmware could not be found?".format(status))
- size = int(root.find("./FUSBody/Put/BINARY_BYTE_SIZE/Data").text)
filename = root.find("./FUSBody/Put/BINARY_NAME/Data").text
+ if filename is None:
+ raise Exception("DownloadBinaryInform failed to find a firmware bundle")
+ size = int(root.find("./FUSBody/Put/BINARY_BYTE_SIZE/Data").text)
path = root.find("./FUSBody/Put/MODEL_PATH/Data").text
return path, filename, size