Skip to content

Commit f91933e

Browse files
committed
don't remove babels "root.dat"
1 parent 6847a25 commit f91933e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/artisan-win.spec

+1-2
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ for qt_dir in [r'PyQt5\Qt5\translations', r'PyQt6\Qt6\translations']:
339339
logging.info(">>>>> Removing unneeded language support from babel")
340340
for root, _, files in os.walk(rootdir + r'\babel\locale-data'):
341341
for file in files:
342-
if file.endswith('.dat') and (('_' not in file and file.split('.')[0] not in SUPPORTED_LANGUAGES) or
342+
if file.endswith('.dat') and file != 'root.dat' and (('_' not in file and file.split('.')[0] not in SUPPORTED_LANGUAGES) or
343343
('_' in file and file.split('.')[0] not in SUPPORTED_LANGUAGES)):
344344
file_path = os.path.join(root, file)
345345
del_file(file_path, True)
@@ -458,4 +458,3 @@ size_bytes = get_size(TARGET) - get_size(TARGET + 'vc_redist.x64.exe')
458458
logging.info(f'>>>>> Net size of install folder: {readable_bytes(size_bytes)}')
459459

460460
###################################
461-

src/plus/schedule.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,10 @@ def getRight(self) -> str:
10881088
return f'{weight}{task_date_str}'
10891089
except Exception as e: # pylint: disable=broad-except
10901090
# if anything goes wrong here we log an exception and return the empty string
1091-
_log.exception(e)
1091+
try: # catch exception on logging exception!
1092+
_log.error(e)
1093+
except Exception as e: # pylint: disable=broad-except
1094+
pass
10921095
return ''
10931096

10941097
def select(self) -> None:

src/setup-macos3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470

471471
for root, _, files in os.walk(f'./Artisan.app/Contents/Resources/lib/{python_version}/babel/locale-data'):
472472
for file in files:
473-
if file.endswith('.dat') and (('_' not in file and file.split('.')[0] not in SUPPORTED_LANGUAGES) or
473+
if file.endswith('.dat') and file != 'root.dat' and (('_' not in file and file.split('.')[0] not in SUPPORTED_LANGUAGES) or
474474
('_' in file and file.split('.')[0] not in SUPPORTED_LANGUAGES)):
475475
# print('Deleting', file)
476476
os.remove(os.path.join(root,file))

0 commit comments

Comments
 (0)