{"action":"created","issue":{"url":"https://api.github.com/repos/SciTools/iris/issues/2014","repository_url":"https://api.github.com/repos/SciTools/iris","labels_url":"https://api.github.com/repos/SciTools/iris/issues/2014/labels{/name}","comments_url":"https://api.github.com/repos/SciTools/iris/issues/2014/comments","events_url":"https://api.github.com/repos/SciTools/iris/issues/2014/events","html_url":"https://github.com/SciTools/iris/pull/2014","id":154453585,"number":2014,"title":"Fix expand filespecs","user":{"login":"davidnmurray","id":17781308,"avatar_url":"https://avatars.githubusercontent.com/u/17781308?v=3","gravatar_id":"","url":"https://api.github.com/users/davidnmurray","html_url":"https://github.com/davidnmurray","followers_url":"https://api.github.com/users/davidnmurray/followers","following_url":"https://api.github.com/users/davidnmurray/following{/other_user}","gists_url":"https://api.github.com/users/davidnmurray/gists{/gist_id}","starred_url":"https://api.github.com/users/davidnmurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidnmurray/subscriptions","organizations_url":"https://api.github.com/users/davidnmurray/orgs","repos_url":"https://api.github.com/users/davidnmurray/repos","events_url":"https://api.github.com/users/davidnmurray/events{/privacy}","received_events_url":"https://api.github.com/users/davidnmurray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-12T10:52:14Z","updated_at":"2016-05-19T17:08:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SciTools/iris/pulls/2014","html_url":"https://github.com/SciTools/iris/pull/2014","diff_url":"https://github.com/SciTools/iris/pull/2014.diff","patch_url":"https://github.com/SciTools/iris/pull/2014.patch"},"body":"This is a fix for issue #1508 . The proposed fix changes filepath expansions in expand_filespecs() from relative paths to absolute ones.\r\n\r\nIn addition, the fix also adds a suitable test for the expand_filespecs function.\r\n\r\n(Edit: removal of an unnecessary URL.)"},"comment":{"url":"https://api.github.com/repos/SciTools/iris/issues/comments/220389746","html_url":"https://github.com/SciTools/iris/pull/2014#issuecomment-220389746","issue_url":"https://api.github.com/repos/SciTools/iris/issues/2014","id":220389746,"user":{"login":"davidnmurray","id":17781308,"avatar_url":"https://avatars.githubusercontent.com/u/17781308?v=3","gravatar_id":"","url":"https://api.github.com/users/davidnmurray","html_url":"https://github.com/davidnmurray","followers_url":"https://api.github.com/users/davidnmurray/followers","following_url":"https://api.github.com/users/davidnmurray/following{/other_user}","gists_url":"https://api.github.com/users/davidnmurray/gists{/gist_id}","starred_url":"https://api.github.com/users/davidnmurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidnmurray/subscriptions","organizations_url":"https://api.github.com/users/davidnmurray/orgs","repos_url":"https://api.github.com/users/davidnmurray/repos","events_url":"https://api.github.com/users/davidnmurray/events{/privacy}","received_events_url":"https://api.github.com/users/davidnmurray/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T17:08:06Z","updated_at":"2016-05-19T17:08:06Z","body":"I've been having a look at the insides of expand_filespecs() and I'm starting to think some of it is unnecessary. This statement:\r\n\r\n    glob_expanded = {fn : sorted(glob.glob(fn)) for fn in filenames}\r\n    value_list = glob_expanded.values()\r\n\r\njust appears to be a complicated way of setting up the error message inside\r\n\r\n    if not all(value_lists):\r\n        raise IOError(\"One or more of the files specified did not exist %s.\" %\r\n        [\"%s expanded to %s\" % (pattern, expanded if expanded else \"empty\")\r\n         for pattern, expanded in sorted(six.iteritems(glob_expanded))])\r\n\r\nand thus might be creating an unnecessary problem, with the unpredictable-returns thing from the dictionary at glob_expanded."}}