diff --git a/pupy/pupylib/PupyCmd.py b/pupy/pupylib/PupyCmd.py index e9ecc742..9c9b85cb 100644 --- a/pupy/pupylib/PupyCmd.py +++ b/pupy/pupylib/PupyCmd.py @@ -786,8 +786,8 @@ class PupyCmd(cmd.Cmd): default_arch=default_arch, default_format=default_format ) - arg_parser.add_argument('-L', '--launcher', default='connect', help='Launcher') arg_parser.add_argument('-t', '--transport', default=self.pupsrv.transport, help='Transport') + arg_parser.add_argument('launcher', nargs='?', default='connect', help='Launcher') arg_parser.add_argument( 'launcher_args', nargs=REMAINDER, default=self.pupsrv.transport_kwargs, help='Transport args' @@ -811,6 +811,10 @@ class PupyCmd(cmd.Cmd): self.display_error('payload generation failed: {}'.format(e)) return + if not output: + self.display_error('payload generation failed') + return + if self.pupsrv.httpd and output.startswith(wwwroot): wwwpath = os.path.relpath(output, wwwroot) if self.config.getboolean('httpd', 'secret'):