Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:ijiraq/cadcVOFS

  • Loading branch information...
commit 5a1240aaecf44732b097e5704f07932687dddf2c 2 parents 1bf0717 + 8d3350d
@ijiraq ijiraq authored
Showing with 11 additions and 5 deletions.
  1. +8 −3 vmkdir
  2. +3 −2 vos/vos.py
View
11 vmkdir
@@ -21,8 +21,10 @@ parser.add_option("--certfile",help="location of your CADC security certificate
if opt.verbose:
logging.basicConfig(level=logging.INFO,format="vmkdir: %(message)s")
-if opt.debug:
- logging.basicConfig(level=logging.DEBUG,format="vcp:%(module)s.%(funcName)s %(message)s")
+elif opt.debug:
+ logging.basicConfig(level=logging.DEBUG,format="vmkdir:%(module)s.%(funcName)s %(message)s")
+else:
+ logging.basicConfig(level=logging.ERROR,format="vmkdir: %(message)s")
if len(args)>1:
@@ -39,7 +41,10 @@ except Exception as e:
client.mkdir(args[0])
if not client.access(args[0]):
- client.mkdir(args[0])
+ try:
+ client.mkdir(args[0])
+ except Exception as e:
+ logging.error(str(e))
elif client.isdir(args[0]):
logging.error("(%s) directory exists." % ( args[0]))
else:
View
5 vos/vos.py
@@ -557,8 +557,9 @@ def checkstatus(self, codes=(200, 201, 202, 206, 302, 303, 503, 416)):
raise IOError(errno.ENOENT,"Node not found",self.url)
if self.resp.status == 401:
raise IOError(errno.EACCES,"Not authorized",self.url)
- logging.debug(self.resp.read())
- raise IOError(self.resp.status,"unexpected server response %s (%d)" % ( self.resp.reason, self.resp.status),self.url)
+ msg=self.resp.read()
+ logging.debug(msg)
+ raise IOError(self.resp.status,msg,self.url)
self.size=self.resp.getheader("Content-Length",0)
return True
Please sign in to comment.
Something went wrong with that request. Please try again.