From: Thomas H. <th...@ct...> - 2014-10-15 17:57:45
|
Sorry for the late reply; I have been traveling and then being sick :-( Am 27.09.2014 um 11:43 schrieb Sommer Detlef: > > Think this does not work. Compile is ok, but when I start the program I get: > > Traceback (most recent call last): > File "boot_service.py", line 180, in <module> > pywintypes.error: (1063, 'StartServiceCtrlDispatcher', 'Der Dienstprozess konnte keine Verbindung mit dem Dienstcontroller herstellen.') > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "boot_service.py", line 182, in <module> > TypeError: 'error' object does not support indexing > > Any ideas ? There is still a bug in the error handling code; this patch should fix it: Index: py2exe/boot_service.py =================================================================== --- py2exe/boot_service.py (revision 758) +++ py2exe/boot_service.py (working copy) @@ -179,7 +179,7 @@ try: servicemanager.StartServiceCtrlDispatcher() except win32service.error as details: - if details[0] == winerror.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: + if details.winerror == winerror.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: win32serviceutil.usage() else: win32serviceutil.HandleCommandLine(k) @@ -192,7 +192,7 @@ try: servicemanager.StartServiceCtrlDispatcher() except win32service.error as details: - if details[0] == winerror.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: + if details.winerror == winerror.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: win32serviceutil.usage() else: # assume/insist that the module provides a HandleCommandLine function. > >> -----Ursprüngliche Nachricht----- >> Von: Thomas Heller [mailto:th...@ct...] >> Gesendet: Freitag, 26. September 2014 20:43 >> An: py2...@li... >> Betreff: Re: [Py2exe-users] py2exe, python 3 and OpenSSL ... >> >> Am 26.09.2014 um 10:15 schrieb Sommer Detlef: >>> >>> Perfect - this look very good. Thank you for the help ! >> >> Thanks for testing. >> >>> One last question - will the python 3 version of py2exe also support >> "cmdline_style='pywin32'" for windows services. >> >> It seems that this simple patch to py2exe/runtime.py will enable this >> support: >> >> @@ -569,13 +570,18 @@ >> optimize=self.options.optimize)) >> >> if target.exe_type == "service": >> + >> + cmdline_style = getattr(target, "cmdline_style", "py2exe") >> + if cmdline_style not in ["py2exe", "pywin32", "custom"]: >> + raise RuntimeError("cmdline_handler invalid") >> + >> # code for services >> # cmdline_style is one of: >> # py2exe >> # pywin32 >> # custom >> code_objects.append( >> - compile("cmdline_style = 'py2exe'; service_module_names >> = %r" % (target.modules,), >> + compile("cmdline_style = %r; service_module_names = %r" >> % (cmdline_style, target.modules,), >> "<service_info>", "exec", >> optimize=self.options.optimize)) >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.cl >> ktrk >> _______________________________________________ >> Py2exe-users mailing list >> Py2...@li... >> https://lists.sourceforge.net/lists/listinfo/py2exe-users > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > |