fix bad python impl

This commit is contained in:
thelittlefireman 2017-07-29 22:51:36 +02:00 committed by GitHub
parent e56eb0e3ab
commit 486fb5825b

View file

@ -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)