* [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43] branches/0.9-clusterdb/lib/Shine
[not found] <E1KwzeG-0006Hy-4p@d5vjzd1.ch3.sourceforge.com>
@ 2008-11-06 15:47 ` Aurelien Degremont
2008-11-06 15:50 ` Aurelien Degremont
0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Degremont @ 2008-11-06 15:47 UTC (permalink / raw)
To: lustre-devel
Quelques petites remarques pas m?chantes :)
> +(dans Commands/Tune.py)
> + tuning = TuningModel(filename="/etc/shine/tuning.conf")
Ne pas oublier que le fichier peut ?tre chang? dans shine.conf :)
tuning = TuningModel(filename=Globals().get_tuning_file())
> + def __open_file(self):
> + """
> + Function used to open the tuning configuration file specified in the __filename attribute
> + """
> + if self.__file != None:
> + # If the fil is already open raise an exception
> + raise Exception("File %s is already open" %(self.__filename))
> + else:
> + try:
> + # Open the file
> + self.__file = open(self.__filename, "r")
> + except IOError, e:
> + raise Exception("Failed to open the tuning configuration file : %s" %(str(e)))
> +
- Fait attention ? ne pas lever des exceptions 'Exception', fait une
sous-classe avec un nom explicit et une petite ligne de doc.
Sinon, un appelant ne peut pas 'catcher' cette erreur l? en particulier
et laisser remonter les autres. (Ne pas faire non plus 1 class par raise
dans le code :), certaines sont certainement du meme type :-)
Es-tu sur d'avoir besoin d'un __open_file, __close_file alors qu'ils ne
sont appel? que dans __load_file ?
Je pense que tu peux simplifier tout ca :)
- Je me demandais, ? propos de la commande Tuning, dans quelle mesure
vous ?tes oblig? de coller ? la syntaxe de fichiers tuning.conf de
LustreUtil ?
Ne serait-ce pas l'occasion de la rendre plus user-friendly?
--
Aurelien Degremont
CEA
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43] branches/0.9-clusterdb/lib/Shine
2008-11-06 15:47 ` [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43] branches/0.9-clusterdb/lib/Shine Aurelien Degremont
@ 2008-11-06 15:50 ` Aurelien Degremont
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Degremont @ 2008-11-06 15:50 UTC (permalink / raw)
To: lustre-devel
Sorry for my previous e-mail, this was a mistake. Please ignore it.
Aurelien Degremont
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-06 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1KwzeG-0006Hy-4p@d5vjzd1.ch3.sourceforge.com>
2008-11-06 15:47 ` [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43] branches/0.9-clusterdb/lib/Shine Aurelien Degremont
2008-11-06 15:50 ` Aurelien Degremont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox