Lustre-devel archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Degremont <aurelien.degremont@cea.fr>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43]	branches/0.9-clusterdb/lib/Shine
Date: Thu, 06 Nov 2008 16:47:23 +0100	[thread overview]
Message-ID: <4913118B.4080301@cea.fr> (raw)
In-Reply-To: <E1KwzeG-0006Hy-4p@d5vjzd1.ch3.sourceforge.com>


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

       reply	other threads:[~2008-11-06 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1KwzeG-0006Hy-4p@d5vjzd1.ch3.sourceforge.com>
2008-11-06 15:47 ` Aurelien Degremont [this message]
2008-11-06 15:50   ` [Lustre-devel] [Lustre-shine-commits] SF.net SVN: lustre-shine:[43] branches/0.9-clusterdb/lib/Shine Aurelien Degremont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4913118B.4080301@cea.fr \
    --to=aurelien.degremont@cea.fr \
    --cc=lustre-devel@lists.lustre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox