#! /usr/bin/env python # rpminstall # Copyright (C) Yasumichi Akahoshi 2011 # # pygtk-rpminstall is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # pygtk-rpminstall is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . from gi.repository import Gtk import os import locale import gettext locale.setlocale(locale.LC_ALL, '') gettext.bindtextdomain("rpminstall") gettext.textdomain("rpminstall") gettext.install('rpminstall', unicode=True) # Import from src first so that we can run directly from the source tree for # development. try: from src import rpminstall except ImportError, e: from rpminstall import rpminstall if os.geteuid() != 0: dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CANCEL, _("Please perform by root authority. ")) dialog.run() exit() app = rpminstall.GUI() Gtk.main()