From fe496b25f9c5ad64cc7b4fa40cfbd0b84c0837ff Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 17 Sep 2012 18:28:55 +0200 Subject: [PATCH] Migrate lib/ovf.py from constants to pathutils File system paths moved from constants to pathutils. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/ovf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ovf.py b/lib/ovf.py index d2cc90f29..c1c54b0f6 100644 --- a/lib/ovf.py +++ b/lib/ovf.py @@ -53,6 +53,7 @@ except AttributeError: from ganeti import constants from ganeti import errors from ganeti import utils +from ganeti import pathutils # Schemas used in OVF format @@ -1080,13 +1081,13 @@ class OVFImporter(Converter): if self.options.output_dir: self.output_dir = os.path.abspath(self.options.output_dir) - if (os.path.commonprefix([constants.EXPORT_DIR, self.output_dir]) != - constants.EXPORT_DIR): + if (os.path.commonprefix([pathutils.EXPORT_DIR, self.output_dir]) != + pathutils.EXPORT_DIR): logging.warning("Export path is not under %s directory, import to" " Ganeti using gnt-backup may fail", - constants.EXPORT_DIR) + pathutils.EXPORT_DIR) else: - self.output_dir = constants.EXPORT_DIR + self.output_dir = pathutils.EXPORT_DIR self.ovf_reader = OVFReader(self.input_path) self.ovf_reader.VerifyManifest() -- GitLab