prise en compte du ~/.dialogrc
This commit is contained in:
parent
ef95c2b159
commit
b88ba2a34f
2 changed files with 12 additions and 3 deletions
|
@ -203,7 +203,7 @@ class Dialog(object):
|
|||
setattr(self, attr, ret)
|
||||
return ret
|
||||
|
||||
def __init__(self, debug_enable=False):
|
||||
def __init__(self, debug_enable=False, dialogrc=False):
|
||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
self.debug_enable = debug_enable
|
||||
|
@ -211,6 +211,7 @@ class Dialog(object):
|
|||
# On met un timeout à 10min d'innactivité sur dialog
|
||||
self.timeout = 600
|
||||
self.error_to_raise = (Continue, DialogError, ldap.SERVER_DOWN)
|
||||
self.dialogrc = dialogrc
|
||||
|
||||
_dialog = None
|
||||
@property
|
||||
|
@ -218,7 +219,9 @@ class Dialog(object):
|
|||
"""
|
||||
Renvois l'objet dialog.
|
||||
"""
|
||||
if self._dialog is None:
|
||||
if self.dialogrc:
|
||||
self._dialog = PythonDialog(DIALOGRC=self.dialogrc)
|
||||
else:
|
||||
self._dialog = PythonDialog()
|
||||
self.dialog_last_access = time.time()
|
||||
return self._dialog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue