Ignore:
Timestamp:
06/12/12 18:30:23 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Hopefully fixed the problem of not restarting properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/mlx.py

    r182 r247  
    77import os
    88import sys
     9
     10#--------------------------------------------------------------------------------------
     11
     12instance = None
    913
    1014#--------------------------------------------------------------------------------------
     
    2428def restart(args = []):
    2529    """Restart the program with the given arguments."""
    26     print "Restarting with args", args
     30    #print "Restarting with args", args
    2731    programPath = os.path.join(os.path.dirname(sys.argv[0]),
    2832                               "runmlx.exe" if os.name=="nt" else "runmlx.sh")
     
    3842    args = [programPath] + args
    3943
     44    instance.close()
    4045    os.execv(programPath, args)   
    4146
     
    4651    from singleton import SingleInstance, raiseCallbackWrapper
    4752
     53    global instance
    4854    instance = SingleInstance("mlx", raiseCallbackWrapper)
    4955    if not instance: return
Note: See TracChangeset for help on using the changeset viewer.