Changeset cb64d86 in sasview for src/sas/sasgui/guiframe/CategoryInstaller.py
- Timestamp:
- Feb 22, 2019 2:25:03 PM (5 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 82d88d5
- Parents:
- 61379c2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/CategoryInstaller.py
r5251ec6 rcb64d86 20 20 21 21 logger = logging.getLogger(__name__) 22 23 if sys.version_info[0] > 2: 24 def json_dump(obj, filename): 25 with open(filename, 'w', newline='\n') as fd: 26 json.dump(obj, fd) 27 else: # CRUFT: python 2.7 support 28 def json_dump(obj, filename): 29 with open(filename, 'wb') as fd: 30 json.dump(obj, fd) 22 31 23 32 class CategoryInstaller(object): … … 171 180 model_enabled_dict) 172 181 173 json .dump(master_category_dict, open(serialized_file, 'w'))182 json_dump(master_category_dict, serialized_file)
Note: See TracChangeset
for help on using the changeset viewer.