Roundup Tracker - Issues

Issue 2550996

classification
Rework roundup-server.py so it emits a more useful error if -c is used on windows without pywin32
Type: behavior Severity: normal
Components: Web interface Versions: devel
process
Status: fixed fixed
:
: rouilj : rouilj
Priority: normal : Effort-Low

Created on 2018-08-22 23:55 by rouilj, last changed 2019-10-25 00:49 by rouilj.

Messages
msg6219 Author: [hidden] (rouilj) Date: 2018-08-22 23:55
On the irc channel a user was trying to start up roundup as a service
and said the '-c' flag wasn't recognized.

I looked through the code.

At roundup-server::run(), the following code:

   if RoundupService:
        short_options += 'c'

sets the option for -c conditionally.

If an import of win32serviceutil fails, RoundupService is set to None.

I think the -c flag should be unconditionally defined.

Then in the code:

      # if running in windows service mode, don't do any other stuff
     if ("-c", "") in optlist:
     ....

check RoundupService for none and exit with a message like:

  -c is not available because roundup couldn't import
     win32serviceutil from pywin32. See Installation docs
     for pywin32 details.

this would at least point the user in the right direction.

Also it may be worth amending the help section to report
the lack of support for -c if win32serviceutil is missing
and you are running on a windows platform. But I am ok with
the current lack of documentation for -c if pywin32 is missing.
msg6769 Author: [hidden] (rouilj) Date: 2019-10-25 00:49
Attempted fix in rev5957:f822a91b3778. This could use windows testing,
but it seems to work with a mock for pywin32.
History
Date User Action Args
2019-10-25 00:49:04rouiljsetstatus: new -> fixed
assignee: rouilj
resolution: fixed
messages: + msg6769
2018-08-22 23:59:35rouiljsetkeywords: + Effort-Low
2018-08-22 23:55:51rouiljcreate