Skip to content

Commit 05361ef

Browse files
committed
Add debuging and exit with 0 if zero length file
1 parent cb195ff commit 05361ef

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bin/stashcp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ def doWriteBack(source, destination):
6464
if 'http_proxy' in os.environ:
6565
del os.environ['http_proxy']
6666

67+
logging.debug("curl command: %s" % command)
6768
curl=subprocess.Popen([command ],shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
6869
(stdout, stderr) = curl.communicate()
6970
curl_exit=curl.returncode
7071
if statinfo.st_size == 0 and curl_exit == 28:
7172
logging.debug("Got curl exit code 28, but that's ok for zero-length files. This doesn't capture connection timeouts")
73+
curl_exit = 0
7274
elif curl_exit != 0:
7375
logging.error(stdout)
7476
logging.error(stderr)

0 commit comments

Comments
 (0)