use the right character to separate the directories in the pathname for the current os
parent
b3b388b11b
commit
b466940a19
|
@ -2,6 +2,7 @@ import math
|
|||
import tempfile
|
||||
import shutil
|
||||
import subprocess
|
||||
import os
|
||||
import psycopg2
|
||||
import psycopg2.extras
|
||||
import json
|
||||
|
@ -106,7 +107,8 @@ def imposm3_import(db_conf, pbf, mapping_file):
|
|||
|
||||
try:
|
||||
print subprocess.check_output((
|
||||
"../imposm3 import -connection %s -read %s"
|
||||
os.path.join("..", "imposm3") +
|
||||
" import -connection %s -read %s"
|
||||
" -write"
|
||||
" -cachedir %s"
|
||||
" -diff"
|
||||
|
@ -126,7 +128,8 @@ def imposm3_deploy(db_conf, mapping_file):
|
|||
|
||||
try:
|
||||
print subprocess.check_output((
|
||||
"../imposm3 import -connection %s"
|
||||
os.path.join("..", "imposm3") +
|
||||
" import -connection %s"
|
||||
" -dbschema-import " + TEST_SCHEMA_IMPORT +
|
||||
" -dbschema-production " + TEST_SCHEMA_PRODUCTION +
|
||||
" -dbschema-backup " + TEST_SCHEMA_BACKUP +
|
||||
|
@ -144,7 +147,8 @@ def imposm3_revert_deploy(db_conf, mapping_file):
|
|||
|
||||
try:
|
||||
print subprocess.check_output((
|
||||
"../imposm3 import -connection %s"
|
||||
os.path.join("..", "imposm3") +
|
||||
" import -connection %s"
|
||||
" -dbschema-import " + TEST_SCHEMA_IMPORT +
|
||||
" -dbschema-production " + TEST_SCHEMA_PRODUCTION +
|
||||
" -dbschema-backup " + TEST_SCHEMA_BACKUP +
|
||||
|
@ -162,7 +166,8 @@ def imposm3_remove_backups(db_conf, mapping_file):
|
|||
|
||||
try:
|
||||
print subprocess.check_output((
|
||||
"../imposm3 import -connection %s"
|
||||
os.path.join("..", "imposm3") +
|
||||
" import -connection %s"
|
||||
" -dbschema-backup " + TEST_SCHEMA_BACKUP +
|
||||
" -removebackup"
|
||||
" -mapping %s ") % (
|
||||
|
@ -178,7 +183,8 @@ def imposm3_update(db_conf, osc, mapping_file):
|
|||
|
||||
try:
|
||||
print subprocess.check_output((
|
||||
"../imposm3 diff -connection %s"
|
||||
os.path.join("..", "imposm3") +
|
||||
" diff -connection %s"
|
||||
" -cachedir %s"
|
||||
" -limitto clipping.geojson"
|
||||
" -dbschema-production " + TEST_SCHEMA_PRODUCTION +
|
||||
|
@ -201,7 +207,8 @@ def cache_query(nodes='', ways='', relations='', deps='', full=''):
|
|||
if full:
|
||||
full = '-full'
|
||||
out = subprocess.check_output(
|
||||
"../imposm3 query-cache -cachedir %s %s %s %s %s %s" % (
|
||||
os.path.join("..", "imposm3") +
|
||||
" query-cache -cachedir %s %s %s %s %s %s" % (
|
||||
tmpdir, nodes, ways, relations, deps, full),
|
||||
shell=True)
|
||||
print out
|
||||
|
|
Loading…
Reference in New Issue