Skip to content

Commit

Permalink
Allow run command to accept **kwargs.
Browse files Browse the repository at this point in the history
  • Loading branch information
umairwaheed authored and timabbott committed Aug 18, 2016
1 parent e7aac71 commit 194cbf1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/lib/zulip_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time

if False:
from typing import Sequence
from typing import Sequence, Any

DEPLOYMENTS_DIR = "/home/zulip/deployments"
LOCK_DIR = os.path.join(DEPLOYMENTS_DIR, "lock")
Expand Down Expand Up @@ -83,11 +83,11 @@ def release_deployment_lock():
# type: () -> None
shutil.rmtree(LOCK_DIR)

def run(args):
# type: (Sequence[str]) -> int
def run(args, **kwargs):
# type: (Sequence[str], **Any) -> int
# Output what we're doing in the `set -x` style
print("+ %s" % (" ".join(args)))
process = subprocess.Popen(args)
process = subprocess.Popen(args, **kwargs)
rc = process.wait()
if rc:
raise subprocess.CalledProcessError(rc, args) # type: ignore # https://github.com/python/typeshed/pull/329
Expand Down

0 comments on commit 194cbf1

Please sign in to comment.