Skip to content

Commit 910b799

Browse files
committed
Merge pull request #95 from rackerlabs/py3
No longer raising exception if Python version is Python 3
2 parents d035512 + 8035587 commit 910b799

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lambda_uploader/shell.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,17 @@ def _execute(args):
100100

101101
def main(arv=None):
102102
"""lambda-uploader command line interface."""
103-
# Check for Python 2.7 (required for Lambda)
104-
if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
105-
raise RuntimeError('lambda-uploader requires Python 2.7')
103+
# Check for Python 2.7 or later
104+
if sys.version_info[0] < 3 and not sys.version_info[1] == 7:
105+
raise RuntimeError('lambda-uploader requires Python 2.7 or later')
106106

107107
import argparse
108108

109109
parser = argparse.ArgumentParser(
110-
version=('version %s' % lambda_uploader.__version__),
111110
description='Simple way to create and upload python lambda jobs')
112111

112+
parser.add_argument('--version', '-v', action='version',
113+
version=lambda_uploader.__version__)
113114
parser.add_argument('--no-upload', dest='no_upload',
114115
action='store_const', help='dont upload the zipfile',
115116
const=True)

0 commit comments

Comments
 (0)