We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 00168a0 + 2970c49 commit fa0aedeCopy full SHA for fa0aede
pyral/context.py
@@ -302,10 +302,13 @@ def _getDefaults(self, response):
302
## print projects.content
303
##
304
if projects:
305
- proj = projects.next()
306
- proj_ref = proj._ref
307
- self._defaultProject = proj.Name
308
- self._currentProject = proj.Name
+ try:
+ proj = projects.next()
+ proj_ref = proj._ref
+ self._defaultProject = proj.Name
309
+ self._currentProject = proj.Name
310
+ except StopIteration: # The default workspace might not have any projects
311
+ pass
312
313
## print " Default Workspace : %s" % self._defaultWorkspace
314
## print " Default Project : %s" % self._defaultProject
0 commit comments