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

do not halt and catch fire when run under py2.6 #31

Merged
merged 1 commit into from Sep 30, 2016

Conversation

jhoblitt
Copy link
Member

When run under python 2.6, the script would exit with a non-zero exit
status and a minimal python stack trace.

Traceback (most recent call last):
  File "<string>", line 4, in <module>
AttributeError: 'tuple' object has no attribute 'major'

This was preventing the script functioning, even in batch mode, on a
vanilla el6 host.

@jhoblitt jhoblitt force-pushed the tickets/DM-7834-py2.6 branch 2 times, most recently from 7f2252c to 071a797 Compare September 30, 2016 19:35
Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version changes are fine. Other comment should be removed.

@@ -187,11 +187,12 @@ fi

if true; then
# Check the version by running a small Python program (taken from the Python EUPS package)
# XXX should not assume that python is in the default path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should. Please remove this comment. We've talked about this extensively in the past. $PYTHON is not correct here because we are checking that the python in their path is okay for building the stack (not good enough for running eups).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment isn't relevant to $PYTHON, it is about the check being a fatal error if python isn't in the path. The logic needs to be refactored.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Like the check in the EUPS package. Please tweak the comment to something like: "XXX this will break if python is not in $PATH". Also, indenting is wrong (the file is full of tabs).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a force push to fix the tabs before you commented... not sure why github isn't rendering it.

When run under python 2.6, the python version test logic would exit with a
non-zero exit status and a minimal python stack trace.

    Traceback (most recent call last):
      File "<string>", line 4, in <module>
    AttributeError: 'tuple' object has no attribute 'major'
@jhoblitt jhoblitt merged commit 7ccd431 into lsst:master Sep 30, 2016
@jhoblitt jhoblitt deleted the tickets/DM-7834-py2.6 branch September 30, 2016 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants