From 32cf20b81d96f5fe9526eb59e153032caf235eeb Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 27 Oct 2014 12:06:30 +0100 Subject: [PATCH] avoid imports within class definitions --- pylot/core/read/data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index ab9b57ec..c62bb4fe 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- import os +from PySide.QtGui import QMessageBox from obspy.core import (read, Stream) from obspy.core.event import (Event, Catalog) from pylot.core.util import fnConstructor @@ -29,10 +30,10 @@ class Data(object): inform = 'Variable wfdata will be empty.' details = '{0}'.format(e) if parent is not None: - from PySide.QtGui import QMessageBox warnio = QMessageBox(parent=parent) warnio.setText(msg) warnio.setDetailedText(details) + warnio.setInformativeText(inform) warnio.setStandarButtons(QMessageBox.Ok) warnio.setIcon(QMessageBox.Warning) else: