We got reports about problems from someone who tried to upgrade their ThinLinc 4.2.0 to ThinLinc 4.6.0 on a system identifying as RHEL5. Here's the relevant errors from tlsetup.log: > 2016-08-01 13:17:33,029: Configuration migration option: parameter > 2016-08-01 13:17:33,031: Traceback (most recent call last): > 2016-08-01 13:17:33,031: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 506, in i11I1I1I > 2016-08-01 13:17:33,031: oOOOo00O00O = o0o ( ) > 2016-08-01 13:17:33,031: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 388, in o0o > 2016-08-01 13:17:33,031: oOooO ( False ) ; > 2016-08-01 13:17:33,031: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 423, in oOooO > 2016-08-01 13:17:33,031: II11Ii1iI1iII ( ii , oOO00oOO ) > 2016-08-01 13:17:33,031: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 367, in II11Ii1iI1iII > 2016-08-01 13:17:33,031: except subprocess . CalledProcessError , IiIIIiI1I1 : > 2016-08-01 13:17:33,031: AttributeError: 'module' object has no attribute 'CalledProcessError'
One "solution" to this is to implement bug 5657 - i.e. raise the system requirements to Python 2.5. This would force us to drop support for RHEL5 though.
We should perhaps (In reply to comment #1) > One "solution" to this is to implement bug 5657 - i.e. raise the system > requirements to Python 2.5. This would force us to drop support for RHEL5 > though. This problem has an easier and more customer-friendly solution: We already ship our own subprocess.py that includes the CalledProcessError exception and check_call call, but tl-setup imports subprocess before modifying sys.path. Most other scripts I've found first modify sys.path and then import subprocess - the lone exception here seems to be tl-ldap-certaliases, which probably should be fixed to behave the same way.
Another way would be to rewrite the offending code to be 2.4-compatible. Discussing bug 4120 could prove helpful prior to this decision.
tl-ldap-certalias was also using the system subprocess, although it was compatible with subprocess from Python 2.4. I've changed both scripts to use our bundled subprocess.
Looks good! Verified that we encountered the problem on RHEL5 when upgrading from 4.5.0 to 4.6.0 and that when upgrading to a nightly build it is fixed. Can't find any other place in ThinLinc which uses the system's subprocess.