Changeset 212bfc2 in sasview for src/sas/sasgui/guiframe/CategoryManager.py
- Timestamp:
- Oct 7, 2016 3:11:40 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b61bd57
- Parents:
- 60df6c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/CategoryManager.py
r80b1df3 r212bfc2 13 13 import sys 14 14 import os 15 import logging 15 16 from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin 16 17 from collections import defaultdict … … 366 367 """ 367 368 try: 368 file = CategoryInstaller.get_user_file() 369 if os.path.isfile(file): 370 cat_file = open(file, 'rb') 371 # self.master_category_dict = pickle.load(cat_file) 372 self.master_category_dict = json.load(cat_file) 373 else: 374 cat_file = open(CategoryInstaller.get_default_file(), 'rb') 375 # self.master_category_dict = pickle.load(cat_file) 376 self.master_category_dict = json.load(cat_file) 377 cat_file.close() 369 cat_file = CategoryInstaller.get_user_file() 370 self.master_category_dict = {} 371 if os.path.isfile(cat_file): 372 with open(cat_file, 'rb') as f: 373 self.master_category_dict = json.load(f) 378 374 except IOError: 379 print 'Problem reading in category file. Please review' 380 375 logging.error('Problem reading in category file.') 381 376 382 377 self._regenerate_model_dict()
Note: See TracChangeset
for help on using the changeset viewer.