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

[FIX] owfeaturecontructor: Fix an IndexError accessing exception's args #1905

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Indexing exception's args member in owfeatureconstructor.py#L584 can raise an IndexError when an exception is constructed without arguments

Description of changes

Use traceback.format_exception_only helper to display the exception message. Also log the full stack trace for easier debugging.

Includes
  • Code changes
  • Tests
  • Documentation

The exception's `args` member can be an empty tuple if an exception
is constructed without any arguments (neither is it necessarily a string
as the code assumed).

Use `traceback.format_exception_only` helper to display the exception
message. Also log the full stack trace for easier debugging.
@codecov-io
Copy link

codecov-io commented Jan 10, 2017

Current coverage is 89.25% (diff: 100%)

Merging #1905 into master will not change coverage

@@             master      #1905   diff @@
==========================================
  Files            86         86          
  Lines          9100       9100          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           8122       8122          
  Misses          978        978          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update 662faf4...3adcd20

@lanzagar lanzagar merged commit 4dad654 into biolab:master Jan 13, 2017
@lanzagar lanzagar added this to the 3.3.10 milestone Jan 13, 2017
astaric pushed a commit to astaric/orange3 that referenced this pull request Jan 18, 2017
…uctor-index-error

[FIX] owfeaturecontructor: Fix an IndexError accessing exception's args
(cherry picked from commit 4dad654)
@ales-erjavec ales-erjavec deleted the fixes/feature-constructor-index-error branch January 27, 2017 10:39
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.

3 participants