Changeset 3431


Ignore:
Timestamp:
Jan 5, 2011 12:04:54 PM (9 years ago)
Author:
jwatson
Message:

Fixing issue with ILM solver base class on Windows - if the "-batch" option isn't specified, the command window waits (unbeknowst to the user) for them to press a key - or Control-C.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/solver/ilmcmd.py

    r2927 r3431  
    3535        if not executable is None:
    3636            try:
    37                 [rc,log] = pyutilib.subprocess.run(executable.get_path())
     37                if sys.platform[0:3] == "win":
     38                   # on windows, the ilm license manager by default pauses after displaying
     39                   # the token status, so that the window doesn't disappear and the user
     40                   # can actually read it. however, if we don't suppress this behavior,
     41                   # this command will stall until the user hits Ctrl-C.
     42                   [rc,log] = pyutilib.subprocess.run(executable.get_path()+" -batch")
     43                else:
     44                   [rc,log] = pyutilib.subprocess.run(executable.get_path())
    3845            except pyutilib.common.WindowsError, err:
    3946                raise pyutilib.common.ApplicationError, "Could not execute the command: ilmtest\n\tError message: "+   str(err)
Note: See TracChangeset for help on using the changeset viewer.