Skip to content

Commit

Permalink
remove redundant encoding arg for binary data
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelmerro committed Nov 25, 2024
1 parent 34752c3 commit 912692d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ All of them are listed in the output as shown here:
```
usage: carafe {<carafe_name>,list} <sub_command>
Welcome to carafe 1.5.0
Welcome to carafe 1.5.1
carafe is a tiny management tool for wine bottles/carafes.
optional arguments:
Expand Down
8 changes: 3 additions & 5 deletions carafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# See README.md for more details and usage instructions
__license__ = "MIT"
# See LICENSE for more details and exact terms
__version__ = "1.5.0"
__version__ = "1.5.1"
# See https://github.com/jelmerro/carafe for repo and updates

import argparse
Expand Down Expand Up @@ -176,9 +176,7 @@ def start(self, args):
start = self.link_location
self.arch = self.read_arch()
path = os.path.join(self.prefix, "drive_c", start)
arg_string = " "
for arg in args.arguments:
arg_string += f"{arg} "
arg_string = " ".join(args.arguments)
if args.keep_log:
self.run_command(
f"{self.wine} \"{path}\" {arg_string}",
Expand Down Expand Up @@ -358,7 +356,7 @@ def run_command(self, command, cwd=None):
if self.arch:
env["WINEARCH"] = self.arch
log_file = os.path.join(self.prefix, "log")
with open(log_file, "wb", encoding="utf-8") as output:
with open(log_file, "wb") as output:
subprocess.run(
command, shell=True, stderr=output, stdout=output,
cwd=cwd, env=env)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name="carafe"
version="1.5.0"
version="1.5.1"
authors=[{name="Jelmer van Arnhem"}]
description="carafe is a tiny management tool for wine bottles/carafes"
license={text="MIT"}
Expand Down

0 comments on commit 912692d

Please sign in to comment.