summaryrefslogtreecommitdiffstats
path: root/samloader/main.py
diff options
context:
space:
mode:
authorNayil Mukhametshin <66028747+nlscc@users.noreply.github.com>2020-09-30 01:05:27 +0200
committerNayil Mukhametshin <66028747+nlscc@users.noreply.github.com>2020-09-30 01:05:27 +0200
commit6f8094c750a4b06dda31e969fec51c47cd1aca03 (patch)
treefc9d3267760a3322528a76d9fa81bd06f4f03343 /samloader/main.py
parentchange copyright (diff)
downloadsamloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar.gz
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar.bz2
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar.lz
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar.xz
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.tar.zst
samloader-6f8094c750a4b06dda31e969fec51c47cd1aca03.zip
Diffstat (limited to 'samloader/main.py')
-rw-r--r--samloader/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/samloader/main.py b/samloader/main.py
index 9088e45..f828208 100644
--- a/samloader/main.py
+++ b/samloader/main.py
@@ -16,6 +16,9 @@ def getbinaryfile(client, fw, region, model):
req = request.binaryinform(fw, region, model, client.nonce)
resp = client.makereq("NF_DownloadBinaryInform.do", req)
root = ET.fromstring(resp)
+ status = root.find("./FUSBody/Results/Status").text
+ if status != 200:
+ raise Exception("DownloadBinaryInform returned {}, firmware could not be found?".format(status))
filename = root.find("./FUSBody/Put/BINARY_NAME/Data").text
path = root.find("./FUSBody/Put/MODEL_PATH/Data").text
return path, filename