Skip to content

Commit

Permalink
Fix small bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Sep 3, 2018
1 parent b57dcd1 commit 42f7bae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ def quote_arg(arg):
except ImportError:
try:
from pipes import quote
import re
except ImportError:
def quote(arg):
if not arg:
return "''"
if re.search(r'[^\w@%+=:,./-]', arg, re.ASCII) is None:
return s
return arg
return "'" + arg.replace("'", "'\"'\"'") + "'"
return quote(str(arg))

Expand Down

0 comments on commit 42f7bae

Please sign in to comment.