An L-spherical code is a set of Euclidean unit vectors whose pairwise inner products belong to the set L. We show, for a fixed α,β>0, that the size of any [−1,−β]∪{α}-spherical code is at most linear in the dimension. In particular, this bound applies to sets of lines such that every two are at a fixed angle to each another.