Skip to content

Fully qualify plugin.PluginError#2175

Merged
liiight merged 2 commits intodevelopfrom
fix-decompress
Jul 20, 2018
Merged

Fully qualify plugin.PluginError#2175
liiight merged 2 commits intodevelopfrom
fix-decompress

Conversation

@jawilson
Copy link
Copy Markdown
Member

Motivation for changes:

Decompress plugin was failing to throw PluginError.

Detailed changes:

  • Fully qualified plugin.PluginError in Decompress plugin

Log and/or tests output (preferably both):

2018-07-19 12:34 CRITICAL task          Movies-Decompress BUG: Unhandled error in plugin decompress: global name 'PluginError' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/flexget/task.py", line 486, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/output/decompress.py", line 205, in on_task_output
    self.handle_entry(entry, config)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/output/decompress.py", line 182, in handle_entry
    to = get_output_path(config['to'], entry)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/output/decompress.py", line 57, in get_output_path
    raise PluginError('Could not render path: %s', to)
NameError: global name 'PluginError' is not defined

return os.path.dirname(entry.get('location'))
except RenderError:
raise PluginError('Could not render path: %s', to)
raise plugin.PluginError('Could not render path: %s', to)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should probably also fix the string interpolation. PluginError only takes one argument iirc.

@liiight liiight merged commit 996325a into develop Jul 20, 2018
@jawilson jawilson deleted the fix-decompress branch August 15, 2018 14:19
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