Project

General

Profile

Anomalie #2084

Test si le conteneur existe à l'instance/reconfigure

Added by Emmanuel GARETTE (2) over 11 years ago. Updated over 11 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
09/20/2011
Due date:
% Done:

100%

Spent time:
Distribution:
EOLE 2.3

Description

Il faudrait tester si le conteneur existe avant de le configurer.

--- cfgparser.py    2011-09-20 21:16:07.000000000 +0200
+++ /usr/share/pyshared/creole/cfgparser.py    2011-09-20 21:22:24.000000000 +0200
@@ -578,6 +578,8 @@
                 containers.append(self.get_container_name(name, tcontainer))
         containers = list(set(containers))
         for container in containers:
+            if not isdir(self._make_root_path(container)):
+                raise Exception("Le conteneur %s n'existe pas" % container)
             for filename in glob(join(self._make_root_path(container), 'config.d', 'eth*')):
                 unlink(filename)
             for filename in glob(join(self._make_root_path(container), 'interfaces.d', 'eth*')):

Associated revisions

Revision 75a5ca3d (diff)
Added by Daniel Dehennin over 11 years ago

Configuring container fails if it does not exist.

  • creole/cfgparser.py (EoleDict.write_config): Test if container exists
    before configuring, patch by Emmanuel Garette (Fixes #2084).

History

#1 Updated by Daniel Dehennin over 11 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat over 11 years ago

  • Assigned To set to Daniel Dehennin
  • Target version set to Mises à jour 2.3 - 02 RC

#3 Updated by Fabrice Barconnière over 11 years ago

  • Status changed from Résolu to Fermé
  • Distribution set to EOLE 2.3

Also available in: Atom PDF