Changeset a67ec83 in sasview for installers/installer_generator.py
- Timestamp:
- May 2, 2017 9:02:06 PM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 13fe3be
- Parents:
- c6bdb3b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
installers/installer_generator.py
r2f6d340 ra67ec83 6 6 from __future__ import print_function 7 7 8 import local_config9 8 import os 10 9 import string … … 58 57 if ext.strip() not in ['.*', ''] and ext.strip() not in list_data: 59 58 list_data.append((ext, 'string', file_type)) 60 except :59 except Exception: 61 60 pass 62 61 try: … … 64 63 if ext.strip() not in ['.', ''] and ext.strip() not in list_app: 65 64 list_app.append((ext, 'string', file_type)) 66 except :65 except Exception: 67 66 pass 68 67 try: … … 71 70 if ext.strip() not in ['.', ''] and ext.strip() not in list_app: 72 71 list_app.append((ext, 'string', file_type)) 73 except :72 except Exception: 74 73 pass 75 74 return list_data, list_app … … 170 169 return msg 171 170 172 def write_language (language=['english'], msfile="compiler:Default.isl"):171 def write_languages(languages=('english',), msfile="compiler:Default.isl"): 173 172 """ 174 173 define the language of the application 175 174 """ 176 175 msg = '' 177 if language :176 if languages: 178 177 msg = "\n\n[Languages]\n" 179 for lang in language: 180 msg += """Name: "%s";\tMessagesFile: "%s"\n""" % (str(lang), 181 str(msfile)) 178 for lang in languages: 179 msg += """Name: "%s";\tMessagesFile: "%s"\n""" % (str(lang), str(msfile)) 182 180 return msg 183 181 … … 358 356 TEMPLATE += write_registry(data_extension=DATA_EXTENSION, 359 357 app_extension=APP_EXTENSION) 360 TEMPLATE += write_language ()358 TEMPLATE += write_languages() 361 359 TEMPLATE += write_tasks() 362 360 TEMPLATE += write_file()
Note: See TracChangeset
for help on using the changeset viewer.