Пример #1
0
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA

from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *

import sys
import socket

# fix/patch for https://bugs.launchpad.net/ubuntu/+source/nagstamon/+bug/732544
socket.setdefaulttimeout(30)

try:
    if __name__ == "__main__":
        # Initialize global configuration
        from Nagstamon.Config import (conf, RESOURCES)

        from Nagstamon.QUI import (APP, statuswindow, check_version)

        statuswindow.show()
        statuswindow.adjustSize()

        if conf.check_for_new_version == True:
            check_version.check(start_mode=True)

        sys.exit(APP.exec_())

except Exception as err:
    import traceback
    traceback.print_exc(file=sys.stdout)
Пример #2
0
        if not lock_config_folder(conf.configdir):
            print('An instance is already running this config ({})'.format(conf.configdir))
            sys.exit(1)

        # get GUI
        from Nagstamon.QUI import (APP,
                                   statuswindow,
                                   check_version,
                                   check_servers,
                                   dialogs)
        # get server information
        from Nagstamon.Servers import (servers,
                                       get_enabled_servers)

        # ask for help if no servers are configured
        check_servers()

        # show and resize status window
        statuswindow.show()
        statuswindow.adjustSize()

        if conf.check_for_new_version == True:
            check_version.check(start_mode=True, parent=statuswindow)

        sys.exit(APP.exec_())


except Exception as err:
    import traceback
    traceback.print_exc(file=sys.stdout)
Пример #3
0
                # dialogs)
        from Nagstamon.QUI import (APP,
                statuswindow,
                check_version,
                check_servers)
        # get server information
        # from Nagstamon.Servers import (servers,
                # get_enabled_servers)

        # ask for help if no servers are configured
        check_servers()

        # show and resize status window
        statuswindow.show()
        statuswindow.adjustSize()

        if conf.check_for_new_version is True:
            check_version.check(start_mode=True, parent=statuswindow)

        try:
            APP.exec_()
            del(APP)
            sys.exit(0)
        except Exception:
            sys.exit(0)


except Exception as err:
    import traceback
    traceback.print_exc(file=sys.stdout)
Пример #4
0
        # Acquire the lock
        if not lock_config_folder(conf.configdir):
            print('An instance is already running this config ({})'.format(conf.configdir))
            sys.exit(1)

        # get GUI
        from Nagstamon.QUI import (APP,
                statuswindow,
                check_version,
                check_servers)

        # ask for help if no servers are configured
        check_servers()

        # show and resize status window
        statuswindow.show()
        if not conf.fullscreen:
            statuswindow.adjustSize()

        if conf.check_for_new_version is True:
            check_version.check(start_mode=True, parent=statuswindow)

        APP.exec()
        del(APP)
        sys.exit(0)

except Exception as err:
    import traceback
    traceback.print_exc(file=sys.stdout)