Skip to content

Commit

Permalink
Allow arguments to the subprocess
Browse files Browse the repository at this point in the history
Use argparse's REMAINDER function to pass everything (including arguments) to the subprocess

Relates to commit 75ade6d
  • Loading branch information
James Turnbull committed Aug 10, 2015
1 parent 9628c80 commit 86b1ef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cron_sentry/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from raven import Client
from subprocess import Popen, PIPE, call
from tempfile import TemporaryFile
from argparse import ArgumentParser
from argparse import ArgumentParser, REMAINDER
from sys import argv
from time import time
from .version import VERSION
Expand All @@ -28,7 +28,7 @@
)
parser.add_argument(
'cmd',
nargs='+',
nargs=REMAINDER,
help='The command to run',
)

Expand Down

0 comments on commit 86b1ef9

Please sign in to comment.