Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 6b4891d

Browse files
committed
use sys.exit instead of site.exit
1 parent 00a45d8 commit 6b4891d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

bob/cli.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Environment Variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, S3_BUCKET, S3_PREFIX (optional)
1414
"""
1515
import os
16+
import sys
1617

1718
from docopt import docopt
1819
from .models import Formula
@@ -27,7 +28,7 @@ def build(formula):
2728
assert f.exists
2829
except AssertionError:
2930
print 'Formula {} doesn\'t appear to exist.'.format(formula)
30-
exit(1)
31+
sys.exit(1)
3132

3233
# CLI lies ahead.
3334
f.build()

bob/models.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def resolve_deps(self):
9999
print
100100
print 'ERROR: Archive {} does not exist.'.format(key_name)
101101
print ' Please deploy it to continue.'
102-
exit(1)
102+
sys.exit(1)
103103

104104
# Grab the Dep from S3, download it to a temp file.
105105
archive = mkstemp()[1]
@@ -129,7 +129,7 @@ def build(self):
129129
if p.returncode != 0:
130130
print
131131
print 'ERROR: An error occurred.'
132-
exit(1)
132+
sys.exit(1)
133133

134134

135135
def archive(self):
@@ -152,7 +152,7 @@ def deploy(self, allow_overwrite=False):
152152
if not allow_overwrite:
153153
print 'ERROR: Archive {} already exists.'.format(key_name)
154154
print ' Use the --overwrite flag to continue.'
155-
exit(1)
155+
sys.exit(1)
156156
else:
157157
key = bucket.new_key(key_name)
158158

0 commit comments

Comments
 (0)