forked from Archive/PX4-Autopilot
Topic generation: Accept non-existing output directory
This commit is contained in:
parent
cdc17f1fdd
commit
17471eab65
|
@ -105,12 +105,13 @@ def convert_dir(inputdir, outputdir, templatedir):
|
||||||
|
|
||||||
# Find the most recent modification time in output dir
|
# Find the most recent modification time in output dir
|
||||||
maxouttime = 0
|
maxouttime = 0
|
||||||
for f in os.listdir(outputdir):
|
if os.path.isdir(outputdir)
|
||||||
fni = os.path.join(outputdir, f)
|
for f in os.listdir(outputdir):
|
||||||
if os.path.isfile(fni):
|
fni = os.path.join(outputdir, f)
|
||||||
it = os.path.getmtime(fni)
|
if os.path.isfile(fni):
|
||||||
if it > maxouttime:
|
it = os.path.getmtime(fni)
|
||||||
maxouttime = it;
|
if it > maxouttime:
|
||||||
|
maxouttime = it;
|
||||||
|
|
||||||
# Do not generate if nothing changed on the input
|
# Do not generate if nothing changed on the input
|
||||||
if (maxinputtime != 0 and maxouttime != 0 and maxinputtime < maxouttime):
|
if (maxinputtime != 0 and maxouttime != 0 and maxinputtime < maxouttime):
|
||||||
|
|
Loading…
Reference in New Issue