Skip to content

Commit

Permalink
fix menu is None
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Aug 21, 2018
1 parent 857789f commit 3508711
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion h5xplorer/h5xplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## https://stackoverflow.com/questions/11513132/embedding-ipython-qt-console-in-a-pyqt-application
##########################################################################################

import os,sys
import os,sys, warnings
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtCore import QAbstractItemModel, QFile, QIODevice, QModelIndex, Qt, QItemSelectionModel
from PyQt5.QtCore import pyqtSignal,pyqtSlot
Expand Down Expand Up @@ -543,6 +543,10 @@ def __init__(self,func_menu=default_context_menu,baseimport=None,extended_select
self.tmp_file = '.tmp.hdf5'
self.data_file = h5py.File(self.tmp_file,'w')

if baseimport is not None:
if not os.path.isfile(baseimport):
warnings.warn('Baseimport %s not found' %baseimport,Warning)

ui = HDF5Browser(self.data_file,res,
func_menu,
baseimport=baseimport,
Expand Down

0 comments on commit 3508711

Please sign in to comment.