From 4169e6acab5bf52dd85be5677b0e84a5a6ad2ab7 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Sat, 17 Aug 2019 15:20:05 +0500 Subject: [PATCH] move the import to the top of the file --- mtprotoproxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index b2aec89..ca3fd94 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -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