ameyp / CscopeSublime

A Cscope plugin for Sublime Text 2 and 3
89 stars 37 forks source link

User configurable database location broke default case #14

Closed vanrijn closed 11 years ago

vanrijn commented 11 years ago

I tried doing a CscopeSublime search and it didn't work. I added some debugging and I see this in the console:

add_to_history [] [] Doing update database. database setting found Traceback (most recent call last): File "./sublimeplugin.py", line 356, in run File "./cscope.py", line 207, in run File "./cscope.py", line 262, in run_cscope File "./cscope.py", line 180, in update_database File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.py", line 119, in dirname i = p.rfind('/') + 1 AttributeError: 'NoneType' object has no attribute 'rfind'

The problem, IIUC, is that by not providing arguments to get_setting(), the default of None is used and then None is compared to an empty string. I've fixed this by providing an empty string default value. Pull request forthcoming.

ghostoy commented 11 years ago

Bump! :+1:

ameyp commented 11 years ago

Thanks for the quick pull request, it was careless on my part to not ensure that everything was working after merging the user-configurable-database pull request.

Merged pull request https://github.com/ameyp/CscopeSublime/pull/15 with commit a09dfa5

vanrijn commented 11 years ago

Nah, no biggie. I'm just thrilled that you're providing this great plugin! =:)

julianchurchill commented 11 years ago

Ah, my fault, sorry for the breakage and thanks for fixing it so quickly!

vanrijn commented 11 years ago

No problem at all Julian and thanks very much for the contribution! =:)