We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2305446 commit bd0eed3Copy full SHA for bd0eed3
mitogen/parent.py
@@ -1466,8 +1466,9 @@ def get_python_argv(self):
1466
return [self.options.python_path]
1467
1468
def get_boot_command(self):
1469
- source = inspect.getsource(self._first_stage)
1470
- source = textwrap.dedent('\n'.join(source.strip().split('\n')[2:]))
+ lines = inspect.getsourcelines(self._first_stage)[0][2:]
+ # Remove line comments, leading indentation, trailing newline
1471
+ source = textwrap.dedent(''.join(s for s in lines if '#' not in s))[:-1]
1472
source = source.replace(' ', ' ')
1473
source = source.replace('CONTEXT_NAME', self.options.remote_name)
1474
preamble_compressed = self.get_preamble()
0 commit comments