Skip to content

Commit

Permalink
avoid crash for not regular message
Browse files Browse the repository at this point in the history
  • Loading branch information
yannrichet-irsn authored Nov 28, 2024
1 parent 399ddcc commit df8f772
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Funz/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def availableModels(refresh_repo = False):
return(None)

l = lambda r: re.sub("plugin-","",r['name'])
return( [l(r) for r in _github_repos if re.subn("plugin-","",r['name'])[1]>0] )
return( [l(r) for r in _github_repos if 'name' in r.keys() and re.subn("plugin-","",r['name'])[1]>0] )

import zipfile
from .inst.Funz import Funz
Expand Down Expand Up @@ -249,9 +249,8 @@ def availableDesigns(refresh_repo = False):
warnings.warn("Failed to acces GitHub Funz repo: "+str(requests.get(f"https://api.github.com/orgs/Funz/repos", headers={}, params={})))
return(None)

print(_github_repos)
l = lambda r: re.sub("algorithm-","",r['name'])
return( [l(r) for r in _github_repos if re.subn("algorithm-","",r['name'])[1]>0] )
return( [l(r) for r in _github_repos if 'name' in r.keys() and re.subn("algorithm-","",r['name'])[1]>0] )

import zipfile
from .inst.Funz import Funz
Expand Down

0 comments on commit df8f772

Please sign in to comment.