sst 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,7 +91,12 @@ if __name__ == '__main__':
91
91
  # would fail with error ModuleNotFoundError
92
92
  sys.path.append(args.src_path)
93
93
 
94
- module = import_module(args.handler_module)
94
+ # remove leading zeros for relative imports
95
+ if args.handler_module.startswith('.'):
96
+ module = import_module(args.handler_module[1:])
97
+ else:
98
+ module = import_module(args.handler_module)
99
+
95
100
  handler = getattr(module, args.handler_name)
96
101
  result = handler(event, context)
97
102
  data = json.dumps(result, default=handleUnserializable).encode("utf-8")