avoid imports within class definitions

This commit is contained in:
Sebastian Wehling-Benatelli 2014-10-27 12:06:30 +01:00
parent c03b8a220f
commit 32cf20b81d

View File

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
from PySide.QtGui import QMessageBox
from obspy.core import (read, Stream) from obspy.core import (read, Stream)
from obspy.core.event import (Event, Catalog) from obspy.core.event import (Event, Catalog)
from pylot.core.util import fnConstructor from pylot.core.util import fnConstructor
@ -29,10 +30,10 @@ class Data(object):
inform = 'Variable wfdata will be empty.' inform = 'Variable wfdata will be empty.'
details = '{0}'.format(e) details = '{0}'.format(e)
if parent is not None: if parent is not None:
from PySide.QtGui import QMessageBox
warnio = QMessageBox(parent=parent) warnio = QMessageBox(parent=parent)
warnio.setText(msg) warnio.setText(msg)
warnio.setDetailedText(details) warnio.setDetailedText(details)
warnio.setInformativeText(inform)
warnio.setStandarButtons(QMessageBox.Ok) warnio.setStandarButtons(QMessageBox.Ok)
warnio.setIcon(QMessageBox.Warning) warnio.setIcon(QMessageBox.Warning)
else: else: