Skip to content

Commit

Permalink
修正:openにignoreオプションを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
matanki-saito committed Dec 8, 2019
1 parent 28605d7 commit 32eee8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions angelica.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_game_install_dir(dir_path, target_app_id):
# acfファイルにある"installdir" "xxxx"をさがす
install_dir_pattern = re.compile(r'\s*"installdir"\s+"(.*)')
game_install_dir_name = None
with open(target_app_acf_path, mode='r', encoding="utf8") as target_app_acf_file:
with open(target_app_acf_path, mode='r', encoding="utf8", errors='ignore') as target_app_acf_file:
for line in target_app_acf_file:
result = install_dir_pattern.match(line)
if result is not None:
Expand Down Expand Up @@ -144,7 +144,7 @@ def get_lib_folders_from_vdf(steam_apps_path):
# vdfファイルにある"[数字]" "xxxx"をさがす
install_dir_pattern = re.compile(r'\s*"[0-9]+"\s+"(.*)')
game_libs_paths = []
with open(library_folders_vdf_path, mode='r', encoding="utf8") as target_vdf_file:
with open(library_folders_vdf_path, mode='r', encoding="utf8", errors='ignore') as target_vdf_file:
for line in target_vdf_file:
result = install_dir_pattern.match(line)
if result is not None:
Expand All @@ -154,7 +154,7 @@ def get_lib_folders_from_vdf(steam_apps_path):


def install_key_file(save_file_path, mod_title, key_file_path):
with open(save_file_path, encoding="utf-8", mode='w') as fw:
with open(save_file_path, encoding="utf-8", mode='w', errors='ignore') as fw:
fw.write("\n".join([
mod_title,
key_file_path
Expand Down
2 changes: 1 addition & 1 deletion github_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def download_asset_from_github(repository_author,

req = urllib.request.Request(request_url)

with open(out_file_path, "wb") as my_file:
with open(out_file_path, "wb", errors='ignore') as my_file:
my_file.write(urllib.request.urlopen(req).read())

return out_file_path

0 comments on commit 32eee8b

Please sign in to comment.