Original issue 85 created by pixelb on 2013-02-12T23:17:07.000Z:
What steps will reproduce the problem?
./fslint-gui --blarg (or any non-supported flag)
What is the expected output? What do you see instead?
Expected is the Usage output, instead there is a crash.
$ ./fslint-gui --versoin
Traceback (most recent call last):
File "./fslint-gui", line 185, in <module>
puts(msg)
File "./fslint-gui", line 36, in puts
sys.stdout.write(string+'\n')
TypeError: unsupported operand type(s) for +: 'GetoptError' and 'str'
What version of the product are you using? On what operating system?
2.42. Tested on Debian and RHEL 6.3
Please provide any additional information below.
I was messing about with fslint when I fat-fingered the version flag. Turns out that "--versoin" causes a crash.
I looked at the function puts and had it spit out the type being passed into puts: <class 'getopt.GetoptError'> . Ah. A quick string conversion fixes that.
The puts function in fslint-gui:
def puts(string=""): #print is problematic in python 3
Original function
# sys.stdout.write(string+'\n')
# Modified function
sys.stdout.write(str(string)+'\n')
Original issue 85 created by pixelb on 2013-02-12T23:17:07.000Z:
What steps will reproduce the problem?
What is the expected output? What do you see instead? Expected is the Usage output, instead there is a crash. $ ./fslint-gui --versoin Traceback (most recent call last): File "./fslint-gui", line 185, in <module> puts(msg) File "./fslint-gui", line 36, in puts sys.stdout.write(string+'\n') TypeError: unsupported operand type(s) for +: 'GetoptError' and 'str'
What version of the product are you using? On what operating system? 2.42. Tested on Debian and RHEL 6.3
Please provide any additional information below.
I was messing about with fslint when I fat-fingered the version flag. Turns out that "--versoin" causes a crash.
I looked at the function puts and had it spit out the type being passed into puts: <class 'getopt.GetoptError'> . Ah. A quick string conversion fixes that.
The puts function in fslint-gui:
def puts(string=""): #print is problematic in python 3
Original function