fix bad python impl
This commit is contained in:
parent
e56eb0e3ab
commit
486fb5825b
|
@ -4,6 +4,7 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import errno
|
||||||
|
|
||||||
from src import CONFIG_FILE, ROOT, CHROME_DRIVER
|
from src import CONFIG_FILE, ROOT, CHROME_DRIVER
|
||||||
from src import log
|
from src import log
|
||||||
|
@ -14,7 +15,7 @@ logger = logging.getLogger('app')
|
||||||
def symlink_force(target, link_name):
|
def symlink_force(target, link_name):
|
||||||
try:
|
try:
|
||||||
os.symlink(target, link_name)
|
os.symlink(target, link_name)
|
||||||
except OSError, e:
|
except OSError as e:
|
||||||
if e.errno == errno.EEXIST:
|
if e.errno == errno.EEXIST:
|
||||||
os.remove(link_name)
|
os.remove(link_name)
|
||||||
os.symlink(target, link_name)
|
os.symlink(target, link_name)
|
||||||
|
|
Loading…
Reference in a new issue