am b7a23959: am 76805140: Merge "Treat zero or >1 dat files as an error"
* commit 'b7a23959984c5407d8cc138ccf017da493c1d24e': Treat zero or >1 dat files as an error
This commit is contained in:
commit
55326c4b97
@ -130,9 +130,14 @@ def BuildIcuToolsAndData(data_filename):
|
|||||||
|
|
||||||
os.chdir(icu_working_dir)
|
os.chdir(icu_working_dir)
|
||||||
icu_dat_data_dir = '%s/stubdata' % icu_dir
|
icu_dat_data_dir = '%s/stubdata' % icu_dir
|
||||||
for file in glob.glob('data/out/tmp/*.dat'):
|
datfiles = glob.glob('data/out/tmp/icudt??l.dat')
|
||||||
print 'Copying %s to %s ...' % (file, icu_dat_data_dir)
|
if len(datfiles) != 1:
|
||||||
shutil.copy(file, icu_dat_data_dir)
|
print 'ERROR: Unexpectedly found %d .dat files (%s). Halting.' % (len(datfiles), datfiles)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
datfile = datfiles[0]
|
||||||
|
print 'Copying %s to %s ...' % (datfile, icu_dat_data_dir)
|
||||||
|
shutil.copy(datfile, icu_dat_data_dir)
|
||||||
|
|
||||||
# Switch back to the original working cwd.
|
# Switch back to the original working cwd.
|
||||||
os.chdir(original_working_dir)
|
os.chdir(original_working_dir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user