diff options
author | Jon Oster <tkfu@users.noreply.github.com> | 2018-06-07 11:16:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 11:16:26 +0200 |
commit | 07e6eb6aedb752e9f0bf856b2b47d8c9518b8900 (patch) | |
tree | c330c3a115975bdc3410db601131be1bc69e38ac | |
parent | 5748c431c2c2f0bc8271d9cadae42c61ef5a67a4 (diff) | |
parent | 53062196720093fed8bd9a192e1af0b2902409f2 (diff) | |
download | meta-updater-07e6eb6aedb752e9f0bf856b2b47d8c9518b8900.tar.gz |
Merge pull request #333 from advancedtelematic/bugfix/strip-whitespace-from-tuf-url-rocko
Bugfix: strip whitespace and newlines from tuf URL in credentials.zip
-rw-r--r-- | recipes-sota/aktualizr/garage-sign-version.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-sota/aktualizr/garage-sign-version.inc b/recipes-sota/aktualizr/garage-sign-version.inc index 66e3ffd..f2d04e8 100644 --- a/recipes-sota/aktualizr/garage-sign-version.inc +++ b/recipes-sota/aktualizr/garage-sign-version.inc | |||
@@ -8,7 +8,7 @@ python () { | |||
8 | with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: | 8 | with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: |
9 | try: | 9 | try: |
10 | with zip_ref.open('tufrepo.url', mode='r') as url_file: | 10 | with zip_ref.open('tufrepo.url', mode='r') as url_file: |
11 | url = url_file.read().decode() + '/health/version' | 11 | url = url_file.read().decode().strip(' \t\n') + '/health/version' |
12 | except (KeyError, ValueError, RuntimeError): | 12 | except (KeyError, ValueError, RuntimeError): |
13 | return | 13 | return |
14 | r = urllib.request.urlopen(url) | 14 | r = urllib.request.urlopen(url) |