Skip to content

Commit 044a54c

Browse files
authored
Merge pull request #487 from M4hbod/main
Minor changes in strings
2 parents 79944e6 + 6d3663b commit 044a54c

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

python/cfscanner/args/testconfig.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def from_args(cls, args: argparse.Namespace):
5959
"permission denied while reading template file")
6060
except Exception as e:
6161
raise TemplateReadError(
62-
"error while reading template file: " + str(e))
62+
f"error while reading template file: {e}"
63+
)
6364

6465
# speed related config
6566
test_config.startprocess_timeout = args.startprocess_timeout

python/cfscanner/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def main():
118118
try:
119119
cidr_list = read_cidrs(args.subnets)
120120
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")
123123
exit(1)
124124
except Exception as e:
125125
console.log(f"Unknown error in reading subnets: {e}")

python/cfscanner/xray/binary.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ def download_binary(
6565
return bin_path
6666
except FileDownloadError as e:
6767
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}")
6969
except KeyError as e:
7070
raise BinaryDownloadError(
7171
f"Failed to get binary from zip file {zip_url}")
7272
except Exception as e:
7373
raise BinaryDownloadError(
74-
f"Unknown error - detected system: {str(system_info)}")
74+
f"Unknown error - detected system: {system_info}")
7575
else:
7676
console.log(f"[bright_blue]Binary file already exists {bin_path}[/bright_blue]")
7777
return bin_path
@@ -83,7 +83,7 @@ def get_latest_release() -> dict:
8383
Returns:
8484
dict: release info including the download url
8585
"""
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"
8787
try:
8888
r = requests.get(url)
8989
release_info = r.json()

0 commit comments

Comments
 (0)