Skip to content

Commit

Permalink
build targets; add better error checking for when flow info command f…
Browse files Browse the repository at this point in the history
…ails (snowkit/flow#23)
  • Loading branch information
ruby0x1 committed Oct 1, 2014
1 parent c4c5ca7 commit 256fbd8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,16 @@ def get_targets(self):
_result.append(['iOS', 'mobile, native ios project'])
_result.append(['Web', 'web, web based app'])

_invalid = self.info_json['targets_invalid']
if self.info_json:

_result[:] = [_item for _item in _result if not _item[0].lower() in _invalid ]
_invalid = self.info_json['targets_invalid']
_result[:] = [_item for _item in _result if not _item[0].lower() in _invalid ]

_result.insert(0, ['unavailable from ' + self.system, ", ".join(_invalid) ])
_result.insert(0, ['unavailable from ' + self.system, ", ".join(_invalid) ])

else :

_result.append(['Error', 'Failed to retrieve flow info from project. View -> Show Console for more info to report!'])

return _result

Expand Down

0 comments on commit 256fbd8

Please sign in to comment.