Fix bug with osmosis subprocess call, cleanup program output

This commit is contained in:
Mike C 2016-01-12 18:19:18 -05:00
parent acfe93d4de
commit b6b11a9318

View file

@ -53,7 +53,7 @@ if __name__ == '__main__':
print(' ', end='')
print(line)
subprocess.run([wget_cmd, '-P', 'dl', line.strip()], stdout=FNULL, stderr=subprocess.STDOUT)
print(' Sleeping 1m to prevent throttle/blocking')
print(' Sleeping to prevent throttle/blocking')
time.sleep(300) # Seconds
print('Decompressing maps (if necessary)')
@ -71,7 +71,7 @@ if __name__ == '__main__':
print(' Found map: ', end='')
print(os.path.join(dirpath, file))
files_to_process.append(os.path.join(dirpath, file))
osmosis_cmd = [os.path.join(base_path, 'bin', 'osmosis', 'bin', 'osmosis', '-Djava.io.tmpdir=' + os.path.join(base_path), 'tmp')]
osmosis_cmd = [os.path.join(base_path, 'bin', 'osmosis', 'bin', 'osmosis'), '-Djava.io.tmpdir=' + os.path.join(base_path, 'tmp')]
for file in files_to_process:
if file.endswith('osm'):
osmosis_cmd.extend(['--rx', 'file=' + file])