Logo Search packages:      
Sourcecode: belier version File versions  Download package

def belier::options::Options::teste_options (   self  ) 

Teste les options

Definition at line 49 of file options.py.

00049                            :
        """Teste les options"""
        if self._options[0].nomfichier is not None:
            fichierentree = abspath(expanduser(self._options[0].nomfichier))
            if not exists(fichierentree):
                print _("%s : no such file") % fichierentree
                sys.exit(1)
            elif not isfile(fichierentree):
                print _("%s is not a file") % fichierentree
                sys.exit(1)
            else:
                self._options[0].nomfichier = fichierentree

        if self._options[0].repsortie is not None:
            repertoiresortie = abspath(expanduser(self._options[0].repsortie))
            if not exists(repertoiresortie):
                print _("%s : no such directory") % repertoiresortie
                sys.exit(1)
            elif not isdir(repertoiresortie):
                print _("%s is not a directory") % repertoiresortie
                sys.exit(1)
            else:
                self._options[0].repsortie = repertoiresortie

        if self._options[0].delai is not None:
            if self._options[0].delai < -1 or \
                self._options[0].delai > sys.maxint:
                print _("The given value is not valid%sThe delay value \
must be >= -1 and <= value of an integer on your system" % linesep)
                sys.exit(1)
            
    def lesoptions(self):


Generated by  Doxygen 1.6.0   Back to index