This file is indexed.

/usr/share/pyshared/jsb/utils/mainloop.py is in jsonbot 0.84.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# jsb/utils/mainloop.py
#
#

""" main loop used in jsb binairies. """

## jsb imports

from jsb.utils.exception import handle_exception
from jsb.lib.eventhandler import mainhandler
from jsb.lib.exit import globalshutdown

## basic imports

import os
import time

## mainloop function

def mainloop():
    """ function to be used as mainloop. """
    while 1:
        try:
            time.sleep(1)
            mainhandler.handle_one()
        except KeyboardInterrupt: break
        except Exception, ex:
            handle_exception()
            break
            #globalshutdown()
            #os._exit(1)
    globalshutdown()
    #os._exit(0)