wrapped things in if __name__ == '__main__'.
This commit is contained in:
parent
74796c804e
commit
7ad4eaa71b
|
@ -99,17 +99,18 @@ def convert_file(inDir, outDir, inFile):
|
||||||
logging.error(f'stdErr was {e.stderr}')
|
logging.error(f'stdErr was {e.stderr}')
|
||||||
logging.error(f'stdOut was {e.stdout}')
|
logging.error(f'stdOut was {e.stdout}')
|
||||||
|
|
||||||
inFile, outFile, compress=parse_arguments()
|
if __name__ == '__main__':
|
||||||
os.chdir(inFile)
|
inFile, outFile, compress=parse_arguments()
|
||||||
tmpDir=TmpDir('./')
|
os.chdir(inFile)
|
||||||
pathsToConvert=find_paths_to_convert('./', [])
|
tmpDir=TmpDir('./')
|
||||||
|
pathsToConvert=find_paths_to_convert('./', [])
|
||||||
|
|
||||||
for i in pathsToConvert:
|
for i in pathsToConvert:
|
||||||
convert_file('./', tmpDir.path, i)
|
convert_file('./', tmpDir.path, i)
|
||||||
|
|
||||||
if compress:
|
if compress:
|
||||||
tmpDir.compress_and_copy_self_to(outFile)
|
tmpDir.compress_and_copy_self_to(outFile)
|
||||||
else:
|
else:
|
||||||
tmpDir.copy_self_to(outFile)
|
tmpDir.copy_self_to(outFile)
|
||||||
|
|
||||||
tmpDir.cleanup()
|
tmpDir.cleanup()
|
||||||
|
|
Loading…
Reference in a new issue