kopia lustrzana https://github.com/kartoza/docker-osm
fix(importer.py): replace mknod by Path.touch (#107)
rodzic
20c11e3ff5
commit
69d85ec12c
|
@ -20,7 +20,8 @@
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sys import exit, stderr
|
from sys import exit, stderr
|
||||||
from os import environ, listdir, mknod
|
from os import environ, listdir
|
||||||
|
from pathlib import Path
|
||||||
from shutil import move
|
from shutil import move
|
||||||
from os.path import join, exists, abspath, isabs
|
from os.path import join, exists, abspath, isabs
|
||||||
from psycopg2 import connect, OperationalError
|
from psycopg2 import connect, OperationalError
|
||||||
|
@ -240,7 +241,7 @@ class Importer(object):
|
||||||
def lockfile(self):
|
def lockfile(self):
|
||||||
setup_lockfile = join(self.default['SETTINGS'], 'importer.lock')
|
setup_lockfile = join(self.default['SETTINGS'], 'importer.lock')
|
||||||
if not exists(setup_lockfile):
|
if not exists(setup_lockfile):
|
||||||
mknod(setup_lockfile)
|
Path(setup_lockfile).touch()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""First checker."""
|
"""First checker."""
|
||||||
|
|
Ładowanie…
Reference in New Issue