예제 #1
0
def main():
    format_ = '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
    logging.basicConfig(level=logging.INFO, format=format_)
    GObject.threads_init()
    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

    # import this later so the logging is properly configured
    from eduvpn.ui import EduVpnApp

    edu_vpn_app = EduVpnApp()
    edu_vpn_app.run()
    Gtk.main()
예제 #2
0
def init(lets_connect):  # type: (bool) -> EduVpnApp
    (level, secure_internet_uri, institute_access_uri, verify_key,
     lets_connect_arg) = parse_args()
    lets_connect = lets_connect or lets_connect_arg
    if geteuid() == 0:
        logger.error("Running eduVPN client as root is not supported (yet)")
        exit(1)
    GObject.threads_init()

    if have_dbus():
        import dbus.mainloop.glib
        dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

    # import this later so the logging is properly configured
    from eduvpn.ui import EduVpnApp

    edu_vpn_app = EduVpnApp(secure_internet_uri=secure_internet_uri,
                            institute_access_uri=institute_access_uri,
                            verify_key=verify_key,
                            lets_connect=lets_connect)
    edu_vpn_app.run()
    return edu_vpn_app
예제 #3
0
 def test_eduvpnapp(self):
     EduVpnApp()