From 3bcae770792afe5d5fff2af127cad2c1d0d59d57 Mon Sep 17 00:00:00 2001 From: "Yaakov M. Nemoy" Date: Thu, 8 Jan 2009 15:27:45 -0500 Subject: Got rid of non absolute _dir properties. In effect, anything that ends in dir shoud usually return an absolute path. The absolute path is dynamically determined using utility functions based on the load time settings of a directory object. This both reduces the number of path ambiguities based on the cwd, and yet removes as many absolute paths from config files, so directory objects can be shared between workspaces and developers. --- modules/sourceball.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/sourceball.py') diff --git a/modules/sourceball.py b/modules/sourceball.py index 8364eda..4a39e94 100644 --- a/modules/sourceball.py +++ b/modules/sourceball.py @@ -19,7 +19,7 @@ from __future__ import with_statement import tarfile -from os.path import abspath, split, basename +from os.path import abspath, split, basename, join from shutil import copytree from subprocess import Popen, PIPE @@ -34,14 +34,14 @@ class SourceBall(Package): def orig_dir(self, dir): return dir + '_orig' - def source_dir(self, *args): + def source(self, *args): if args[0] == 'orig': return self.orig_dir(self.cfg['source']) else: return self.cfg['source'] def add_sourceball(self, sourceball_name, extract_dir=None): - log.debug('addincg sourceball with code_dir ' + self.code_dir) + log.debug('addincg sourceball with dir ' + self.dir) with pwd(self.dir): try: sourceball_name = copy(sourceball_name, -- cgit