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 abb77e7 commit 82a0efcCopy full SHA for 82a0efc
mitogen/parent.py
@@ -1463,8 +1463,9 @@ def get_python_argv(self):
1463
return [self.options.python_path]
1464
1465
def get_boot_command(self):
1466
- source = inspect.getsource(self._first_stage)
1467
- 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
1468
+ source = textwrap.dedent(''.join(s for s in lines if '#' not in s))[:-1]
1469
source = source.replace(' ', ' ')
1470
compressor = zlib.compressobj(
1471
zlib.Z_BEST_COMPRESSION, zlib.DEFLATED, -zlib.MAX_WBITS,
0 commit comments