← Back to team overview

kabikaboo team mailing list archive

[Bug 501644] Re: v1.7 - Duplicate Instance Detection Fails

 

Well, for one thing , the application is now just "kabikaboo" not
"python kabikaboo.py" . Check your top or System Monitor or whichever to
verify. (And then there's the other kabikaboo-dev which is really just
local kabikaboo which probably should be done a little differently,
maybe with a command line option)

-- 
v1.7 - Duplicate Instance Detection Fails
https://bugs.launchpad.net/bugs/501644
You received this bug notification because you are a member of Kabikaboo
Team, which is subscribed to Kabikaboo.

Status in Kabikaboo: New

Bug description:
In 1.6 this worked.  
It should be a simple fix for Linux.

Modify the search function in kabikaboo.py ~ line 2938:

# check for duplicate instance of kabikaboo
    def check_for_duplicate_instance(self):
        result = False
        # WARNING: LINUX ONLY CODE
        output = commands.getoutput('ps -ax')
        # check for 2 or more regular instances
        if output.count('python kabikaboo.py') >= 2:
            result = True
        # check for instance and development instance
        if output.count('python kabikaboo.py') >= 1 and output.count('python -W ignore::DeprecationWarning kabikaboo.py') >= 1:
            result = True
        if result:
            print 'Duplicate instance of Kabikaboo already running.'
            print 'Will not open last file in this case.'
            print 'Starting with new document.'
            self.file.working_file = ''
        return result

Windows will need different code to do this.





References