Showing
2 changed files
with
8 additions
and
7 deletions
... | @@ -93,7 +93,8 @@ class Context(object): | ... | @@ -93,7 +93,8 @@ class Context(object): |
93 | for event_source_cfg in self.config['lambda']['event_sources']: | 93 | for event_source_cfg in self.config['lambda']['event_sources']: |
94 | _, _, svc, _ = event_source_cfg['arn'].split(':', 3) | 94 | _, _, svc, _ = event_source_cfg['arn'].split(':', 3) |
95 | if svc == 'kinesis': | 95 | if svc == 'kinesis': |
96 | - self.event_sources.append(kappa.event_source.KinesisEventSource( | 96 | + self.event_sources.append( |
97 | + kappa.event_source.KinesisEventSource( | ||
97 | self, event_source_cfg)) | 98 | self, event_source_cfg)) |
98 | elif svc == 's3': | 99 | elif svc == 's3': |
99 | self.event_sources.append(kappa.event_source.S3EventSource( | 100 | self.event_sources.append(kappa.event_source.S3EventSource( | ... | ... |
... | @@ -80,7 +80,7 @@ class Function(object): | ... | @@ -80,7 +80,7 @@ class Function(object): |
80 | LOG.debug(response) | 80 | LOG.debug(response) |
81 | self._arn = response['FunctionARN'] | 81 | self._arn = response['FunctionARN'] |
82 | except Exception: | 82 | except Exception: |
83 | - LOG.debug('Unable to find ARN for function: %s' % self.name) | 83 | + LOG.debug('Unable to find ARN for function: %s', self.name) |
84 | return self._arn | 84 | return self._arn |
85 | 85 | ||
86 | @property | 86 | @property |
... | @@ -101,12 +101,12 @@ class Function(object): | ... | @@ -101,12 +101,12 @@ class Function(object): |
101 | with zipfile.ZipFile(zipfile_name, 'w') as zf: | 101 | with zipfile.ZipFile(zipfile_name, 'w') as zf: |
102 | for root, dirs, files in os.walk(lambda_dir): | 102 | for root, dirs, files in os.walk(lambda_dir): |
103 | zf.write(root, os.path.relpath(root, relroot)) | 103 | zf.write(root, os.path.relpath(root, relroot)) |
104 | - for file in files: | 104 | + for filename in files: |
105 | - filename = os.path.join(root, file) | 105 | + filepath = os.path.join(root, filename) |
106 | - if os.path.isfile(filename): | 106 | + if os.path.isfile(filepath): |
107 | arcname = os.path.join( | 107 | arcname = os.path.join( |
108 | - os.path.relpath(root, relroot), file) | 108 | + os.path.relpath(root, relroot), filename) |
109 | - zf.write(filename, arcname) | 109 | + zf.write(filepath, arcname) |
110 | 110 | ||
111 | def _zip_lambda_file(self, zipfile_name, lambda_file): | 111 | def _zip_lambda_file(self, zipfile_name, lambda_file): |
112 | LOG.debug('_zip_lambda_file: lambda_file=%s', lambda_file) | 112 | LOG.debug('_zip_lambda_file: lambda_file=%s', lambda_file) | ... | ... |
-
Please register or login to post a comment