Skip to content

Commit 8c4a702

Browse files
authored
Merge pull request #6 from XiaoLu-Ling/master
fix File xxx already exists
2 parents ef2d134 + 32b3f2c commit 8c4a702

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/Sound.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def download_file(name: str, hash: str):
3434
nameCheck = re.compile(f'{realFileName.split(".")[0]}.+?m4a')
3535
checked = check_file(nameCheck, dirName)
3636

37-
if not os.path.isfile(name) and checked is None:
37+
if not os.path.isfile(name) and checked is False:
3838
print(f'Downloading {name}...')
3939
r = requests.get(f'{Constants.SOUND_URL}/{hash[:2]}/{hash}').content
4040
with open(name, 'wb') as f:
@@ -129,4 +129,4 @@ def sound() -> None:
129129

130130

131131
if __name__ == '__main__':
132-
sound()
132+
sound()

0 commit comments

Comments
 (0)