Pouvoir utiliser un fichier de préférences
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
diff --git usr/bin/importation_scribe usr/bin/importation_scribe
|
diff --git usr/bin/importation_scribe usr/bin/importation_scribe
|
||||||
index 0db4982..c1cb947 100755
|
index 0db4982..d005329 100755
|
||||||
--- usr/bin/importation_scribe
|
--- usr/bin/importation_scribe
|
||||||
+++ usr/bin/importation_scribe
|
+++ usr/bin/importation_scribe
|
||||||
@@ -42,21 +42,22 @@ choix de la source de données et imports
|
@@ -42,21 +42,22 @@ choix de la source de données et imports
|
||||||
@ -26,7 +26,84 @@ index 0db4982..c1cb947 100755
|
|||||||
|
|
||||||
class OutOfRange(Exception):
|
class OutOfRange(Exception):
|
||||||
""" Exception OutOfRange """
|
""" Exception OutOfRange """
|
||||||
@@ -458,33 +459,45 @@ class Console:
|
@@ -158,61 +159,71 @@ def ask_prefs(prefs):
|
||||||
|
prefs.save()
|
||||||
|
|
||||||
|
def ask_eleves_prefs():
|
||||||
|
"""
|
||||||
|
préférences élèves
|
||||||
|
"""
|
||||||
|
print("************************")
|
||||||
|
print("** Préférences Elèves **")
|
||||||
|
print("************************")
|
||||||
|
print()
|
||||||
|
- ask_prefs(preferences.get_eleves_prefs())
|
||||||
|
+ prefs = preferences.get_eleves_prefs()
|
||||||
|
+ if not isfile(prefs.path):
|
||||||
|
+ ask_prefs(preferences.get_eleves_prefs())
|
||||||
|
|
||||||
|
def ask_responsables_prefs():
|
||||||
|
"""
|
||||||
|
préférences responsables
|
||||||
|
"""
|
||||||
|
print("******************************")
|
||||||
|
print("** Préférences Responsables **")
|
||||||
|
print("******************************")
|
||||||
|
print()
|
||||||
|
- ask_prefs(preferences.get_responsables_prefs())
|
||||||
|
+ prefs = preferences.get_responsables_prefs()
|
||||||
|
+ if not isfile(prefs.path):
|
||||||
|
+ ask_prefs(preferences.get_responsables_prefs())
|
||||||
|
|
||||||
|
def ask_enseignants_prefs():
|
||||||
|
"""
|
||||||
|
préférences enseignants
|
||||||
|
"""
|
||||||
|
print("*****************************")
|
||||||
|
print("** Préférences Enseignants **")
|
||||||
|
print("*****************************")
|
||||||
|
print()
|
||||||
|
- ask_prefs(preferences.get_enseignants_prefs())
|
||||||
|
+ prefs = preferences.get_enseignants_prefs()
|
||||||
|
+ if not isfile(prefs.path):
|
||||||
|
+ ask_prefs(preferences.get_enseignants_prefs())
|
||||||
|
|
||||||
|
def ask_administratifs_prefs():
|
||||||
|
"""
|
||||||
|
préférences administratifs
|
||||||
|
"""
|
||||||
|
print("********************************")
|
||||||
|
print("** Préférences Administratifs **")
|
||||||
|
print("********************************")
|
||||||
|
print()
|
||||||
|
- ask_prefs(preferences.get_administratifs_prefs())
|
||||||
|
+ prefs = preferences.get_administratifs_prefs()
|
||||||
|
+ if not isfile(prefs.path):
|
||||||
|
+ ask_prefs(preferences.get_administratifs_prefs())
|
||||||
|
|
||||||
|
def ask_invites_prefs():
|
||||||
|
"""
|
||||||
|
préférences comptes invités
|
||||||
|
"""
|
||||||
|
print("*************************")
|
||||||
|
print("** Préférences Invités **")
|
||||||
|
print("*************************")
|
||||||
|
print()
|
||||||
|
- ask_prefs(preferences.get_invites_prefs())
|
||||||
|
+ prefs = preferences.get_invites_prefs()
|
||||||
|
+ if not isfile(prefs):
|
||||||
|
+ ask_prefs(preferences.get_invites_prefs())
|
||||||
|
|
||||||
|
|
||||||
|
#______________________________________________________________________________
|
||||||
|
|
||||||
|
class Console:
|
||||||
|
"""
|
||||||
|
Questions à utiliser en mode console
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
@@ -458,33 +469,45 @@ class Console:
|
||||||
"""
|
"""
|
||||||
log.add_lock()
|
log.add_lock()
|
||||||
log.debuglog("Arrêt de LSC...", title=True)
|
log.debuglog("Arrêt de LSC...", title=True)
|
||||||
|
Reference in New Issue
Block a user