소스 검색

chore: format

Byaidu 1 년 전
부모
커밋
dfd3063190
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      pdf2zh/gui.py

+ 1 - 1
pdf2zh/gui.py

@@ -97,7 +97,7 @@ def download_with_limit(url, save_path, size_limit):
         try:
             _, params = cgi.parse_header(content)
             filename = params["filename"]
-        except:
+        except Exception:
             filename = os.path.basename(url)
         with open(save_path / filename, "wb") as file:
             for chunk in response.iter_content(chunk_size=chunk_size):