Revision c4feafe8 lib/cmdlib.py

b/lib/cmdlib.py
5866 5866
          self.needed_locks[locking.LEVEL_NODE].append(src_node)
5867 5867
        if not os.path.isabs(src_path):
5868 5868
          self.op.src_path = src_path = \
5869
            os.path.join(constants.EXPORT_DIR, src_path)
5869
            utils.PathJoin(constants.EXPORT_DIR, src_path)
5870 5870

  
5871 5871
      # On import force_variant must be True, because if we forced it at
5872 5872
      # initial install, our only chance when importing it back is that it
......
5974 5974
          if src_path in exp_list[node].payload:
5975 5975
            found = True
5976 5976
            self.op.src_node = src_node = node
5977
            self.op.src_path = src_path = os.path.join(constants.EXPORT_DIR,
5978
                                                       src_path)
5977
            self.op.src_path = src_path = utils.PathJoin(constants.EXPORT_DIR,
5978
                                                         src_path)
5979 5979
            break
5980 5980
        if not found:
5981 5981
          raise errors.OpPrereqError("No export found for relative path %s" %
......
6012 6012
        if export_info.has_option(constants.INISECT_INS, option):
6013 6013
          # FIXME: are the old os-es, disk sizes, etc. useful?
6014 6014
          export_name = export_info.get(constants.INISECT_INS, option)
6015
          image = os.path.join(src_path, export_name)
6015
          image = utils.PathJoin(src_path, export_name)
6016 6016
          disk_images.append(image)
6017 6017
        else:
6018 6018
          disk_images.append(False)
......
6148 6148
      string_file_storage_dir = self.op.file_storage_dir
6149 6149

  
6150 6150
    # build the full file storage dir path
6151
    file_storage_dir = os.path.normpath(os.path.join(
6152
                                        self.cfg.GetFileStorageDir(),
6153
                                        string_file_storage_dir, instance))
6151
    file_storage_dir = utils.PathJoin(self.cfg.GetFileStorageDir(),
6152
                                      string_file_storage_dir, instance)
6154 6153

  
6155 6154

  
6156 6155
    disks = _GenerateDiskTemplate(self,

Also available in: Unified diff