move the import to the top of the file

This commit is contained in:
Alexander Bersenev
2019-08-17 15:20:05 +05:00
parent 121a8974de
commit 4169e6acab

View File

@@ -17,6 +17,7 @@ import re
import runpy
import signal
import os
import stat
TG_DATACENTER_PORT = 443
@@ -1750,9 +1751,8 @@ def try_setup_uvloop():
def remove_unix_socket(path):
from stat import S_ISSOCK
try:
if S_ISSOCK(os.stat(path).st_mode):
if stat.S_ISSOCK(os.stat(path).st_mode):
os.unlink(path)
except (FileNotFoundError, NotADirectoryError):
pass