astropy/astropy — pull request #1482 by mdboom (2013-09-23 18:52:16+00:00)
Title: CompositeUnit object has not attribute name

I have the following problem:

```python
>>> from astropy import units as u
>>> x1 = u.Quantity(1.0, u.m)
>>> x1.unit.name
u'm'
>>> x2 = u.Quantity(2.0, u.dimensionless_unscaled)
>>> x3 = x1 * x2
>>> x3

>>> x3.unit
Unit("m")
>>> x3.unit.name
AttributeError: 'CompositeUnit' object has no attribute 'name'
```

`x2.unit.name` also gives me the same error.

Is this a bug? In `pysynphot`, filter bandpass is unitless. I wish to multiply it with a given stellar spectrum, and then extract the unit name of the product. Theoretically, the product should have same unit as stellar spectrum, but the example above shows that it is not the case via `astropy.units`.