Skip to content

Commit

Permalink
Merge c6068f3 into 43795be
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Nov 4, 2016
2 parents 43795be + c6068f3 commit 51798dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -50,6 +50,7 @@ matrix:
before_install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
- conda install pyqt=4

script:
- python setup.py $SETUP_CMD
Expand Down
12 changes: 10 additions & 2 deletions pvextractor/pvregions.py
Expand Up @@ -105,10 +105,18 @@ def line_to_path(region):

for x in region.coord_list:
if l is None:
l = x.to(u.deg).value
if hasattr(x,'unit'):
l = x.to(u.deg).value
else:
l = x
else:
b = x.to(u.deg).value
if hasattr(x,'unit'):
b = x.to(u.deg).value
else:
b = x
if l is not None and b is not None:
if hasattr(b,'unit') or hasattr(l,'unit'):
raise TypeError("Can't work with a list of quantities")
endpoints.append((l,b))
l,b = None,None
else:
Expand Down

0 comments on commit 51798dd

Please sign in to comment.