Skip to content

Commit 53daf67

Browse files
committed
Merge pull request #1 from rackerlabs/fixed_requirements_bug
Fixed requirements attr on config object when set to none
2 parents d604b1e + 9a8489b commit 53daf67

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lambda_uploader/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'region': basestring, 'handler': basestring,
2020
'role': basestring, 'timeout': int, 'memory': int}
2121

22-
DEFAULT_PARAMS = {'requirements': None, 'publish': False}
22+
DEFAULT_PARAMS = {u'requirements': [], u'publish': False}
2323

2424

2525
class Config(object):

lambda_uploader/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def cleanup(path):
3333
os.remove(zip_file)
3434

3535

36-
def build_package(path, requirements=None):
36+
def build_package(path, requirements):
3737
temp_workspace = os.path.join(path, TEMP_WORKSPACE_NAME)
3838
# Calling cleanup first to cover a previous failed run
3939
cleanup(path)
@@ -51,7 +51,7 @@ def build_package(path, requirements=None):
5151
raise Exception('virtualenv returned unsuccessfully')
5252

5353
cmd = None
54-
if requirements is not None:
54+
if not requirements:
5555
LOG.debug("Installing requirements found %s in config" % requirements)
5656
cmd = [os.path.join(pkg_venv, 'bin/pip'),
5757
'install', " ".join(requirements)]

0 commit comments

Comments
 (0)