Skip to content

Commit

Permalink
Swap if statement for better readability
Browse files Browse the repository at this point in the history
Signed-off-by: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com>
  • Loading branch information
amorphousWaste authored and Jawabiscuit committed Sep 15, 2023
1 parent af69b8d commit 489b7bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/rezplugins/shell/sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,10 @@ def escape_string(self, value, is_path=False, is_shell_path=False):
if not txt.startswith("'"):
txt = "'%s'" % txt
else:
if is_path:
txt = self.normalize_paths(txt)
# txt = self.as_path(txt)
elif is_shell_path:
if is_shell_path:
txt = self.as_shell_path(txt)
elif is_path:
txt = self.normalize_paths(txt)

txt = txt.replace('\\', '\\\\')
txt = txt.replace('"', '\\"')
Expand Down

0 comments on commit 489b7bc

Please sign in to comment.