@@ -42,8 +42,9 @@ Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
42
42
[clj-ssh.reflect :as reflect]
43
43
[clojure.java.io :as io]
44
44
[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+]])
47
48
(:import [com.jcraft.jsch
48
49
JSch Session Channel ChannelShell ChannelExec ChannelSftp
49
50
Identity IdentityFile Logger KeyPair]))
@@ -510,7 +511,7 @@ Options are
510
511
5 (. target#
511
512
(~name (first args#) (second args#) (nth args# 2 ) (nth args# 3 )
512
513
(nth args# 4 )))
513
- (slingshot/ throw+
514
+ (throw+
514
515
(java.lang.IllegalArgumentException.
515
516
(str " Too many arguments passed. Limit 5, passed " (count args#)))))))
516
517
@@ -556,7 +557,7 @@ Options are
556
557
(conj args (sftp-modemap (options :mode )))
557
558
args)]
558
559
((memfn-varargs put) channel args))
559
- (slingshot/ throw+
560
+ (throw+
560
561
(java.lang.IllegalArgumentException. (str " Unknown SFTP command " cmd)))))
561
562
562
563
(defn sftp
@@ -628,7 +629,7 @@ Options are
628
629
[in]
629
630
(let [code (.read in)]
630
631
(when-not (zero? code)
631
- (slingshot/ throw+
632
+ (throw+
632
633
{:type :clj-ssh/scp-failure
633
634
:message (format
634
635
" clj-ssh scp failure: %s"
@@ -708,7 +709,7 @@ Options are
708
709
(fn [path]
709
710
(let [file (java.io.File. path)]
710
711
(when (.isDirectory file)
711
- (slingshot/ throw+
712
+ (throw+
712
713
{:type :clj-ssh/scp-directory-copy-requested
713
714
:message (format
714
715
" Copy of dir %s requested without recursive flag"
@@ -861,7 +862,7 @@ Options are
861
862
_ (when (and (.exists file)
862
863
(not (.isDirectory file))
863
864
(> (count remote-paths) 1 ))
864
- (slingshot/ throw+
865
+ (throw+
865
866
{:type :clj-ssh/scp-copy-multiple-files-to-file-requested
866
867
:message (format
867
868
" Copy of multiple files to file %s requested"
0 commit comments