zanata/zanata-python-client — pull request #3 by jmrodri (2013-10-16 19:30:36+00:00)
Title: TypeError: 'NoneType' object is not iterable

If item b is None, we should not try to iterate over it.

zanata pull --srcdir .. causes the following error:

Traceback (most recent call last):
File "/usr/bin/zanata", line 25, in
zanata.run()
File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 945, in run
program_name=os.path.split(sys.argv[0])[1],
File "/usr/lib/python2.7/site-packages/zanataclient/command.py", line 339, in handle_program
command(command_options, args)
File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 820, in pull
command.run(command_options, args, project_type)
File "/usr/lib/python2.7/site-packages/zanataclient/pullcmd.py", line 74, in run
zanatacmd.verify_project(project_id, version_id)
File "/usr/lib/python2.7/site-packages/zanataclient/zanatacmd.py", line 103, in verify_project
self.zanata_resource.projects.get(project_id)
File "/usr/lib/python2.7/site-packages/zanataclient/zanatalib/projectservice.py", line 85, in get
project = Project(server_return)
File "/usr/lib/python2.7/site-packages/zanataclient/zanatalib/project.py", line 47, in __init__
setattr(self, str(a), [Link(item) for item in b])
TypeError: 'NoneType' object is not iterable