| Server IP : 107.13.46.68 / Your IP : 216.73.216.232 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/linuxmint/mintreport/ |
Upload File : |
#!/usr/bin/python3
import gi
import importlib
import os
import sys
import threading
from gi.repository import GObject
DATA_DIR = "/usr/share/linuxmint/mintreport"
INFO_DIR = os.path.join(DATA_DIR, "reports")
TMP_DIR = "/tmp/mintreport"
# Used as a decorator to run things in the background
def _async(func):
def wrapper(*args, **kwargs):
thread = threading.Thread(target=func, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()
return thread
return wrapper
# Used as a decorator to run things in the main loop, from another thread
def idle(func):
def wrapper(*args):
GObject.idle_add(func, *args)
return wrapper
class InfoReportContainer():
def __init__(self, uuid, path):
self.uuid = uuid
self.path = path
sys.path.insert(0, path)
import MintReportInfo
importlib.reload(MintReportInfo)
self.instance = MintReportInfo.Report()
sys.path.remove(path)