summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nephilim/plugin.py5
-rw-r--r--nephilim/plugins/AlbumCover.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/nephilim/plugin.py b/nephilim/plugin.py
index 6760868..f0ce498 100644
--- a/nephilim/plugin.py
+++ b/nephilim/plugin.py
@@ -104,8 +104,9 @@ class Plugin(QtCore.QObject):
def _add_widget(self, widget, label = '', tooltip = ''):
"""adds a widget with label"""
- if not self.layout():
- self.logger.error('Attempted to call add_widget with no layout set.')
+ if self.layout() is None:
+ raise ValueError('Attempted to call add_widget with no layout set.')
+
widget.setToolTip(tooltip)
layout = QtWidgets.QHBoxLayout()
layout.addWidget(QtWidgets.QLabel(label))
diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py
index c576c56..ea34b4b 100644
--- a/nephilim/plugins/AlbumCover.py
+++ b/nephilim/plugins/AlbumCover.py
@@ -181,7 +181,7 @@ class AlbumCover(Plugin):
# sites list
fetchers = self.settings.value('fetchers')
self.fetcherlist = QtWidgets.QListWidget(self)
- self.fetcherlist.setDragDropMode(QtGui.QAbstractItemView.InternalMove)
+ self.fetcherlist.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove)
for site in fetchers:
it = QtWidgets.QListWidgetItem(site)
it.setCheckState(QtCore.Qt.Checked)