From 6aa876b06aed75aa2ae22bdf149fcc5ec73314f3 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Mon, 11 Jun 2012 00:10:28 +0200 Subject: [PATCH] Fix python2.5ism --- polysh/file_transfer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/polysh/file_transfer.py b/polysh/file_transfer.py index f12abc6..923cb60 100644 --- a/polysh/file_transfer.py +++ b/polysh/file_transfer.py @@ -61,7 +61,10 @@ def base64version(): return encoded def tarCreate(path): - path = path.rstrip('/') or ('/' if path else '.') + if path: + path = path.rstrip('/') or '/' + else: + path = '.' dirname = pipes.quote(os.path.dirname(path) or '.') basename = pipes.quote(os.path.basename(path) or '/') return 'tar c -C %s %s' % (dirname, basename) -- 2.11.4.GIT