Skip to content

Commit df8f772

Browse files
avoid crash for not regular message
1 parent 399ddcc commit df8f772

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Funz/install.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def availableModels(refresh_repo = False):
5656
return(None)
5757

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

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

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

256255
import zipfile
257256
from .inst.Funz import Funz

0 commit comments

Comments
 (0)