summaryrefslogtreecommitdiff
path: root/xnt
diff options
context:
space:
mode:
authorkennyballou <kballou@onyx.boisestate.edu>2013-03-07 19:00:26 -0700
committerkennyballou <kballou@onyx.boisestate.edu>2013-03-07 19:00:26 -0700
commit999b6a30a11bd692eedb7d5cc76a618c3a534358 (patch)
tree086d646616b8318cef3a8ee9f7a4342166f570a8 /xnt
parent9ef292afa91cad6685e29c459ec9c43a5271af6b (diff)
parent5e928a3a38e20fa386d6ade2154676a5bc601b95 (diff)
downloadxnt-999b6a30a11bd692eedb7d5cc76a618c3a534358.tar.gz
xnt-999b6a30a11bd692eedb7d5cc76a618c3a534358.tar.xz
Merge branch 'tasks-refactor' into lint-refactor
Conflicts: xnt/tasks.py xnt/tests/taskcompressiontests.py
Diffstat (limited to 'xnt')
-rw-r--r--xnt/__init__.py2
-rw-r--r--xnt/tasks.py6
-rw-r--r--xnt/tests/taskcompressiontests.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/xnt/__init__.py b/xnt/__init__.py
index baf4317..496da56 100644
--- a/xnt/__init__.py
+++ b/xnt/__init__.py
@@ -41,7 +41,7 @@ __license__ = """
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-from xnt.tasks import cp, mv, mkdir, rm, zip, log, call, setup
+from xnt.tasks import cp, mv, mkdir, rm, create_zip, log, xntcall, call, setup
def target(target_fn):
"""Decorator function for marking a method in
diff --git a/xnt/tasks.py b/xnt/tasks.py
index fd97891..a647b0b 100644
--- a/xnt/tasks.py
+++ b/xnt/tasks.py
@@ -96,7 +96,7 @@ def rm(*fileset): #pylint: disable-msg=C0103
except:
raise
-def zip(directory, zipfilename):
+def create_zip(directory, zipfilename):
"""Compress (Zip) folder"""
LOGGER.info("Zipping %s as %s", directory, zipfilename)
assert os.path.isdir(directory) and zipfilename
@@ -129,8 +129,8 @@ def xntcall(path, targets=None, props=None):
"""
import xnt.xenant
from xnt.commands.target import TargetCommand
- command = TargetCommand(xnt.xenant.loadBuild(path))
- return command.run(targets=targets, props=None)
+ command = TargetCommand(xnt.xenant.load_build(path))
+ return command.run(targets=targets, props=props)
def call(command, stdout=None, stderr=None):
""" Execute the given command, redirecting stdout and stderr
diff --git a/xnt/tests/taskcompressiontests.py b/xnt/tests/taskcompressiontests.py
index 625a2b5..574298b 100644
--- a/xnt/tests/taskcompressiontests.py
+++ b/xnt/tests/taskcompressiontests.py
@@ -35,7 +35,7 @@ class TaskCompressionTests(unittest.TestCase): #pylint: disable-msg=R0904
def test_zip(self):
"""Test zip method"""
- xnt.tasks.zip("temp/testfolder1", "temp/myzip.zip")
+ xnt.tasks.create_zip("temp/testfolder1", "temp/myzip.zip")
self.assertTrue(os.path.exists("temp/myzip.zip"))
if __name__ == "__main__":