| Trees | Indices | Help |
|---|
|
|
1 # Copyright 2006 Red Hat, Inc.
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License.
6 #
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
11 #
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 #
16 # Authors:
17 # Daniel Benamy <dbenamy@redhat.com>
18
19 import os
20 from up2date_client import rhnreg
21 from up2date_client import rhnregGui
22 from up2date_client import up2dateErrors
23 from rhn_register_firstboot_gui_window import RhnRegisterFirstbootGuiWindow
24
25 import gtk
26 from gtk import glade
27 import gettext
28 t = gettext.translation('rhn-client-tools', fallback=True)
29 _ = t.ugettext
30 gtk.glade.bindtextdomain("rhn-client-tools")
31
32
33 -class RhnProvideCertificateWindow(RhnRegisterFirstbootGuiWindow, rhnregGui.ProvideCertificatePage):
34 runPriority=107
35 moduleName = _("Provide Certificate")
36 windowTitle = moduleName
37 shortMessage = _("Provide a certificate for this Red Hat Satellite server")
38 needsparent = 1
39 needsnetwork = 1
40 noSidebar = True
41
43 RhnRegisterFirstbootGuiWindow.__init__(self)
44 rhnregGui.ProvideCertificatePage.__init__(self)
45 if rhnreg.registered():
46 self.skipme = True
47
49 return self.provideCertificatePageVbox()
50
52 """Returns True to change the page or None to stay on the same page."""
53 status = self.provideCertificatePageApply()
54 if status == 0: # cert was installed
55 return True
56 elif status == 1: # the user doesn't want to provide a cert right now
57 # TODO write a message to disk like the other cases? need to decide
58 # how we want to do error handling in general.
59 self.parent.setPage("rhn_finish_gui")
60 return True
61 else: # an error occurred and the user was notified
62 assert status == 2
63 return None
64
65
66 childWindow = RhnProvideCertificateWindow
67
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Mar 4 07:37:44 2020 | http://epydoc.sourceforge.net |