astrofrog/pyavm — pull request #23 by keflavich (2014-03-25 14:00:16+00:00)
Title: Sometimes content is a List of None?

Test file is 'http://www.usm.uni-muenchen.de/people/preibisch/laboca-opt1000.jpg'

```
A = pyavm.AVM.from_image('laboca-opt1000.jpg')
Traceback (most recent call last):
File "", line 1, in
A = pyavm.AVM.from_image('laboca-opt1000.jpg')
File "/Users/adam/virtual-python/lib/python2.7/site-packages/pyavm/avm.py", line 382, in from_image
return cls.from_xml(xml)
File "/Users/adam/virtual-python/lib/python2.7/site-packages/pyavm/avm.py", line 414, in from_xml
content = avm_class.check_data(content)
File "/Users/adam/virtual-python/lib/python2.7/site-packages/pyavm/datatypes.py", line 83, in check_data
raise TypeError("{0:s} is not a string or unicode".format(self.tag))
TypeError: Spectral.Notes is not a string or unicode

> /Users/adam/virtual-python/lib/python2.7/site-packages/pyavm/datatypes.py(83)check_data()
82 else:
---> 83 raise TypeError("{0:s} is not a string or unicode".format(self.tag))
84

ipdb>
```

It seems that `value` is `None`, but it misses the `if not value` check because `content`, passed in to `check_data`, was `[None]` instead of just `None`