mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
move the import to the top of the file
This commit is contained in:
@@ -17,6 +17,7 @@ import re
|
|||||||
import runpy
|
import runpy
|
||||||
import signal
|
import signal
|
||||||
import os
|
import os
|
||||||
|
import stat
|
||||||
|
|
||||||
|
|
||||||
TG_DATACENTER_PORT = 443
|
TG_DATACENTER_PORT = 443
|
||||||
@@ -1750,9 +1751,8 @@ def try_setup_uvloop():
|
|||||||
|
|
||||||
|
|
||||||
def remove_unix_socket(path):
|
def remove_unix_socket(path):
|
||||||
from stat import S_ISSOCK
|
|
||||||
try:
|
try:
|
||||||
if S_ISSOCK(os.stat(path).st_mode):
|
if stat.S_ISSOCK(os.stat(path).st_mode):
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
except (FileNotFoundError, NotADirectoryError):
|
except (FileNotFoundError, NotADirectoryError):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user