File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ def from_args(cls, args: argparse.Namespace):
59
59
"permission denied while reading template file" )
60
60
except Exception as e :
61
61
raise TemplateReadError (
62
- "error while reading template file: " + str (e ))
62
+ f"error while reading template file: { e } "
63
+ )
63
64
64
65
# speed related config
65
66
test_config .startprocess_timeout = args .startprocess_timeout
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ def main():
118
118
try :
119
119
cidr_list = read_cidrs (args .subnets )
120
120
except SubnetsReadError as e :
121
- console .log (f "[red1]Could not read subnets.[/red1]" )
122
- logger .exception (f "Could not read subnets" )
121
+ console .log ("[red1]Could not read subnets.[/red1]" )
122
+ logger .exception ("Could not read subnets" )
123
123
exit (1 )
124
124
except Exception as e :
125
125
console .log (f"Unknown error in reading subnets: { e } " )
Original file line number Diff line number Diff line change @@ -65,13 +65,13 @@ def download_binary(
65
65
return bin_path
66
66
except FileDownloadError as e :
67
67
raise BinaryDownloadError (
68
- f"Failed to download the release zip file from xtls xray-core github repo { str ( system_info ) } " )
68
+ f"Failed to download the release zip file from xtls xray-core github repo { system_info } " )
69
69
except KeyError as e :
70
70
raise BinaryDownloadError (
71
71
f"Failed to get binary from zip file { zip_url } " )
72
72
except Exception as e :
73
73
raise BinaryDownloadError (
74
- f"Unknown error - detected system: { str ( system_info ) } " )
74
+ f"Unknown error - detected system: { system_info } " )
75
75
else :
76
76
console .log (f"[bright_blue]Binary file already exists { bin_path } [/bright_blue]" )
77
77
return bin_path
@@ -83,7 +83,7 @@ def get_latest_release() -> dict:
83
83
Returns:
84
84
dict: release info including the download url
85
85
"""
86
- url = f "https://api.github.com/repos/XTLS/Xray-core/releases/latest"
86
+ url = "https://api.github.com/repos/XTLS/Xray-core/releases/latest"
87
87
try :
88
88
r = requests .get (url )
89
89
release_info = r .json ()
You can’t perform that action at this time.
0 commit comments