Skip to content

Commit

Permalink
Fix code issue in running shell command
Browse files Browse the repository at this point in the history
  • Loading branch information
wenijinew committed Nov 15, 2023
1 parent f9ef22e commit 2562297
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
8 changes: 0 additions & 8 deletions eutmux.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,6 @@ def init(config_file="eutmux.yaml"):
theme_filename = f"{eutmux_config_home}/{theme_filename}"
else:
theme_filename = "eutmux.theme.yaml"
<<<<<<< HEAD
<<<<<<< HEAD

=======
>>>>>>> 9e9ce1d (Fix code issue in running shell command)
=======
print(theme_filename)
>>>>>>> fa2ca52 (temp)
with open(theme_filename, "r", encoding=UTF_8) as theme_file:
theme_config = yaml.safe_load(theme_file)
theme = Theme(theme_config)
Expand Down
11 changes: 0 additions & 11 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ def get_tmux_option(name, default_value):
def run_shell_command(command, default_output=None):
"""Run shell command."""
command_args = shlex.split(command)
<<<<<<< HEAD
result = (
subprocess.Popen(command_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
)
print(result.returncode)
if result.returncode != 0:
return default_output
else:
return result.stdout.strip()
=======
with (
subprocess.Popen(command_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
) as process:
Expand All @@ -48,4 +38,3 @@ def run_shell_command(command, default_output=None):
if __name__ == "__main__":
value = get_tmux_option("@eutmux_base_color_total", 5)
print(value)
>>>>>>> 9e9ce1d (Fix code issue in running shell command)

0 comments on commit 2562297

Please sign in to comment.