Hello community,

here is the log from the commit of package pssh for openSUSE:Factory checked in 
at 2014-01-20 20:43:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pssh (Old)
 and      /work/SRC/openSUSE:Factory/.pssh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pssh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/pssh/pssh.changes        2014-01-15 
16:26:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.pssh.new/pssh.changes   2014-01-23 
15:53:35.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Jan 15 19:11:41 UTC 2014 - [email protected]
+
+- Clarify error message when API calls fail
+- Detect use of absolute path when slurping
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ 0005-Add-an-explicit-API-entrypoint.patch ++++++
--- /var/tmp/diff_new_pack.ho2fow/_old  2014-01-23 15:53:36.000000000 +0100
+++ /var/tmp/diff_new_pack.ho2fow/_new  2014-01-23 15:53:36.000000000 +0100
@@ -1,4 +1,4 @@
-From 1c5c0431d3862d1e26fd815cd55cd15dc80f1240 Mon Sep 17 00:00:00 2001
+From 90fb623eac7451c60623125f1087c4b80097d276 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
 Date: Tue, 7 Jan 2014 16:30:48 +0100
 Subject: [PATCH 5/8] Add an explicit API entrypoint
@@ -6,23 +6,23 @@
 api.py has convencience wrappers for call, copy and slurp. These
 are easy-to-use programmatic versions of pssh, pscp and pslurp.
 ---
- psshlib/api.py       | 326 +++++++++++++++++++++++++++++++++++++++++++++++++++
- psshlib/callbacks.py |  59 ++++++++++
+ psshlib/api.py       | 332 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ psshlib/callbacks.py |  59 +++++++++
  psshlib/cli.py       |   6 +-
  psshlib/manager.py   |  38 ++++--
  psshlib/task.py      |  96 +++++++--------
  test/api.py          |  76 ++++++++++++
- 6 files changed, 532 insertions(+), 69 deletions(-)
+ 6 files changed, 538 insertions(+), 69 deletions(-)
  create mode 100644 psshlib/api.py
  create mode 100644 psshlib/callbacks.py
  create mode 100644 test/api.py
 
 diff --git a/psshlib/api.py b/psshlib/api.py
 new file mode 100644
-index 000000000000..8043aed3796e
+index 000000000000..085d83fc5b7c
 --- /dev/null
 +++ b/psshlib/api.py
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,332 @@
 +# Copyright (c) 2013, Kristoffer Gronlund
 +#
 +# psshlib API
@@ -63,10 +63,14 @@
 +    in case of an error during the processing for
 +    that host.
 +    """
-+    def __init__(self, msg):
++    def __init__(self, msg, task):
 +        self.msg = msg
++        self.task = task
 +
 +    def __str__(self):
++        if self.task and self.task.errorbuffer:
++            return "%s, Error output: %s" % (self.msg,
++                                             self.task.errorbuffer)
 +        return self.msg
 +
 +
@@ -122,7 +126,7 @@
 +        ret = {}
 +        for task in self.finished_tasks:
 +            if task.failures:
-+                ret[task.host] = Error(', '.join(task.failures))
++                ret[task.host] = Error(', '.join(task.failures), task)
 +            else:
 +                ret[task.host] = (task.exitstatus,
 +                                  task.outputbuffer or manager.outdir,
@@ -193,7 +197,7 @@
 +        ret = {}
 +        for task in self.finished_tasks:
 +            if task.failures:
-+                ret[task.host] = Error(', '.join(task.failures))
++                ret[task.host] = Error(', '.join(task.failures), task)
 +            else:
 +                ret[task.host] = (task.exitstatus,
 +                                  task.outputbuffer or manager.outdir,
@@ -268,7 +272,7 @@
 +        ret = {}
 +        for task in self.finished_tasks:
 +            if task.failures:
-+                ret[task.host] = Error(', '.join(task.failures))
++                ret[task.host] = Error(', '.join(task.failures), task)
 +            else:
 +                # TODO: save name of output file in Task
 +                ret[task.host] = (task.exitstatus,
@@ -322,6 +326,8 @@
 +    opts: CopyOptions (optional)
 +    Returns {host: (rc, stdout, stdin, localpath) | Error}
 +    """
++    if os.path.isabs(dst):
++        raise ValueError("slurp: Destination must be a relative path")
 +    localdirs = _slurp_make_local_dirs(hosts, dst, opts)
 +    if opts.outdir and not os.path.exists(opts.outdir):
 +        os.makedirs(opts.outdir)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to