Skip to content

Commit 279b398

Browse files
committed
Update to slingshot 0.10.0
1 parent 8b06d5e commit 279b398

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<dependency>
9595
<groupId>slingshot</groupId>
9696
<artifactId>slingshot</artifactId>
97-
<version>0.2.0</version>
97+
<version>0.10.0</version>
9898
</dependency>
9999
<dependency>
100100
<groupId>org.clojure</groupId>
@@ -144,6 +144,12 @@
144144
<clojure.version>1.3.0</clojure.version>
145145
</properties>
146146
</profile>
147+
<profile>
148+
<id>clojure-1.4</id>
149+
<properties>
150+
<clojure.version>1.4.0-alpha3</clojure.version>
151+
</properties>
152+
</profile>
147153
</profiles>
148154

149155
<properties>

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:description "ssh from clojure"
33
:dependencies [[org.clojure/clojure "1.2.0"]
44
[org.clojure/tools.logging "0.1.2"]
5-
[slingshot "0.2.0"]
5+
[slingshot "0.10.0"]
66
[com.jcraft/jsch "0.1.44-1"]]
77
:dev-dependencies [[log4j/log4j "1.2.14"]]
88
:autodoc {:name "clj-ssh"

src/clj_ssh/ssh.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
4242
[clj-ssh.reflect :as reflect]
4343
[clojure.java.io :as io]
4444
[clojure.string :as string]
45-
[clojure.tools.logging :as logging]
46-
[slingshot.core :as slingshot])
45+
[clojure.tools.logging :as logging])
46+
(:use
47+
[slingshot.slingshot :only [throw+]])
4748
(:import [com.jcraft.jsch
4849
JSch Session Channel ChannelShell ChannelExec ChannelSftp
4950
Identity IdentityFile Logger KeyPair]))
@@ -510,7 +511,7 @@ Options are
510511
5 (. target#
511512
(~name (first args#) (second args#) (nth args# 2) (nth args# 3)
512513
(nth args# 4)))
513-
(slingshot/throw+
514+
(throw+
514515
(java.lang.IllegalArgumentException.
515516
(str "Too many arguments passed. Limit 5, passed " (count args#)))))))
516517

@@ -556,7 +557,7 @@ Options are
556557
(conj args (sftp-modemap (options :mode)))
557558
args)]
558559
((memfn-varargs put) channel args))
559-
(slingshot/throw+
560+
(throw+
560561
(java.lang.IllegalArgumentException. (str "Unknown SFTP command " cmd)))))
561562

562563
(defn sftp
@@ -628,7 +629,7 @@ Options are
628629
[in]
629630
(let [code (.read in)]
630631
(when-not (zero? code)
631-
(slingshot/throw+
632+
(throw+
632633
{:type :clj-ssh/scp-failure
633634
:message (format
634635
"clj-ssh scp failure: %s"
@@ -708,7 +709,7 @@ Options are
708709
(fn [path]
709710
(let [file (java.io.File. path)]
710711
(when (.isDirectory file)
711-
(slingshot/throw+
712+
(throw+
712713
{:type :clj-ssh/scp-directory-copy-requested
713714
:message (format
714715
"Copy of dir %s requested without recursive flag"
@@ -861,7 +862,7 @@ Options are
861862
_ (when (and (.exists file)
862863
(not (.isDirectory file))
863864
(> (count remote-paths) 1))
864-
(slingshot/throw+
865+
(throw+
865866
{:type :clj-ssh/scp-copy-multiple-files-to-file-requested
866867
:message (format
867868
"Copy of multiple files to file %s requested"

0 commit comments

Comments
 (0)