Skip to content

Commit

Permalink
Fix firmware download
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Nov 28, 2020
1 parent 6f6d085 commit 49ae278
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion zigpy_zigate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAJOR_VERSION = 0
MINOR_VERSION = 7
PATCH_VERSION = '3'
PATCH_VERSION = '4'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
6 changes: 6 additions & 0 deletions zigpy_zigate/tools/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ def get_releases():
r = urllib.request.urlopen(URL)
if r.status == 200:
for release in json.loads(r.read()):
if release.get('draft'):
continue
if release.get('prerelease'):
continue
for asset in release['assets']:
if 'pdm' in asset['name'].lower():
continue
if asset['name'].endswith('.bin'):
LOGGER.info('Found %s', asset['name'])
releases[asset['name']] = asset['browser_download_url']
Expand Down

0 comments on commit 49ae278

Please sign in to comment.