Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickets/dm 4361 #5

Merged
merged 2 commits into from
Nov 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions python/lsst/obs/sdss/yanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
It is used for the makeCcd step of makeCamera, to read the opConfig and opECalib
files in etc/.
"""

#
# Modules
#
Expand All @@ -32,10 +33,12 @@
import os.path
import datetime
import numpy
from astropy.extern import six
# from astropy.extern import six

if six.PY3:
long = int
# NOTE: commented out to remove astropy.extern.six dependency
# NOTE: Should be revisited when Python 3 support is added to the stack
# if six.PY3:
# long = int

#
# Classes
Expand Down Expand Up @@ -330,7 +333,10 @@ def __init__(self,filename=None,np=False,debug=False):
#
# Handle file-like objects
#
if isinstance(filename, six.string_types):
# NOTE: commented out to remove astropy.extern.six dependency
# NOTE: Should be revisited when Python 3 support is added to the stack
# if isinstance(filename, six.string_types):
if isinstance(filename, basestring):
if os.access(filename,os.R_OK):
self.filename = filename
with open(filename,'r') as f:
Expand Down