Mercurial > p > roundup > code
changeset 5957:f822a91b3778
Better error message running with -c and pywin32 is not importable.
Atempting to do this. It should work on windows, but I can't test.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 24 Oct 2019 20:47:46 -0400 |
| parents | 1cfd52dee91b |
| children | 5148e46dd314 |
| files | CHANGES.txt roundup/scripts/roundup_server.py |
| diffstat | 2 files changed, 22 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Thu Oct 24 20:43:21 2019 -0400 +++ b/CHANGES.txt Thu Oct 24 20:47:46 2019 -0400 @@ -12,6 +12,16 @@ onwards Python 3.4 and later are also supported. +2019-xx-xx 2.0.0... + +Features: + +Fixed: + +- issue2550996 - Give better error message when running with -c + (install as windows service) and pywin32 is not importable. Could use + better testing on a windows box. (John Rouillard) + 2019-10-23 2.0.0 alpha 0 Features:
--- a/roundup/scripts/roundup_server.py Thu Oct 24 20:43:21 2019 -0400 +++ b/roundup/scripts/roundup_server.py Thu Oct 24 20:47:46 2019 -0400 @@ -951,9 +951,7 @@ ''' config = ServerConfig() # additional options - short_options = "hvS" - if RoundupService: - short_options += 'c' + short_options = "hvSc" try: (optlist, args) = config.getopt(sys.argv[1:], short_options, ("help", "version", "save-config",)) @@ -963,6 +961,17 @@ # if running in windows service mode, don't do any other stuff if ("-c", "") in optlist: + global RoundupService + if not RoundupService: + RoundupService = True # make sure usage displays -c help text + error_m = """ +ERROR: -c is not available because roundup couldn't import + win32serviceutil from pywin32. See Installation docs + for pywin32 details. + """ + usage(error_m) + return + # acquire command line options recognized by service short_options = "cC:" long_options = ["config"]
