From 0cdb8c32211c2381114598bca0eec5ad144f9fc4 Mon Sep 17 00:00:00 2001
From: Simone Margaritelli <evilsocket@gmail.com>
Date: Sun, 20 Oct 2019 19:29:11 +0200
Subject: [PATCH] misc: small fix or general refactoring i did not bother
 commenting

---
 pwnagotchi/plugins/default/auto-update.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pwnagotchi/plugins/default/auto-update.py b/pwnagotchi/plugins/default/auto-update.py
index 7c04506..f96dcd1 100644
--- a/pwnagotchi/plugins/default/auto-update.py
+++ b/pwnagotchi/plugins/default/auto-update.py
@@ -51,7 +51,7 @@ def check(version, repo, native=True):
             # check if this release is compatible with arm6
             for asset in latest['assets']:
                 download_url = asset['browser_download_url']
-                if download_url.endswith('.zip') and (arch in download_url or is_arm and 'armhf' in download_url):
+                if download_url.endswith('.zip') and (info['arch'] in download_url or (is_arm and 'armhf' in download_url)):
                     info['url'] = download_url
                     break