diff options
author | nlscc <66028747+nlscc@users.noreply.github.com> | 2022-02-22 02:05:18 +0100 |
---|---|---|
committer | nlscc <66028747+nlscc@users.noreply.github.com> | 2022-02-22 02:05:18 +0100 |
commit | 576bd29fa120ba4e37b68178fafbc73e2c74908a (patch) | |
tree | a8b6b61704d3dabf5f64bc955cb629b727eb7cff | |
parent | bump version -> 0.4 (diff) | |
download | samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar.gz samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar.bz2 samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar.lz samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar.xz samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.tar.zst samloader-576bd29fa120ba4e37b68178fafbc73e2c74908a.zip |
-rw-r--r-- | samloader/main.py | 4 |
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 |