@benkrikler : sorry for the delay and thanks for submitting the PR!
In general it is a very nice enhancement for our Python bindings.
However, I noticed while testing your PR that if the path contains a component that does not exist following exception is being raised:
Traceback (most recent call last):
File "test.py", line 6, in <module>
print glob.glob( 'root://slc7-test//tmp/dir3/file*' )
File "/home/simonm/xrootd/build/bindings/python/build/lib.linux-x86_64-2.7/XRootD/glob.py", line 59, in glob
return xrootd_glob(pathname)
File "/home/simonm/xrootd/build/bindings/python/build/lib.linux-x86_64-2.7/XRootD/glob.py", line 80, in xrootd_glob
for entry in dirlist.dirlist:
AttributeError: 'NoneType' object has no attribute 'dirlist'
same happen when I try to glob elements of directory that has not been exported on the XRootD server, e.g. for a server where only /tmp
is exported try:
glob.glob( 'root://hostname//*' )
Could you improve error handling?
Thanks,
Michal
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@simonmichal in #854: @benkrikler : sorry for the delay and thanks for submitting the PR!\r\n\r\nIn general it is a very nice enhancement for our Python bindings.\r\n\r\nHowever, I noticed while testing your PR that if the path contains a component that does not exist following exception is being raised:\r\n```\r\nTraceback (most recent call last):\r\n File \"test.py\", line 6, in \u003cmodule\u003e\r\n print glob.glob( 'root://slc7-test//tmp/dir3/file*' )\r\n File \"/home/simonm/xrootd/build/bindings/python/build/lib.linux-x86_64-2.7/XRootD/glob.py\", line 59, in glob\r\n return xrootd_glob(pathname)\r\n File \"/home/simonm/xrootd/build/bindings/python/build/lib.linux-x86_64-2.7/XRootD/glob.py\", line 80, in xrootd_glob\r\n for entry in dirlist.dirlist:\r\nAttributeError: 'NoneType' object has no attribute 'dirlist'\r\n```\r\n\r\nsame happen when I try to glob elements of directory that has not been exported on the XRootD server, e.g. for a server where only `/tmp` is exported try:\r\n\r\n`glob.glob( 'root://hostname//*' )`\r\n\r\nCould you improve error handling?\r\n\r\nThanks, \r\nMichal"}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/854#issuecomment-481583748"}}}
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/xrootd/xrootd/pull/854#issuecomment-481583748",
"url": "https://github.com/xrootd/xrootd/pull/854#issuecomment-481583748",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1