{"action":"created","comment":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/68226973","id":68226973,"diff_hunk":"@@ -39,53 +39,70 @@ def getResourceUsage( self ):\n \n     cpuLimit = None\n     wallClockLimit = None\n+    wallClock = None\n+    jobStartSecs = None\n \n+    jobFeaturesPath = None\n+    machineFeaturesPath = None\n+\n+    #Getting info from JOBFEATURES\n     try:\n       # We are not called from TimeLeft.py if these are not set\n       jobFeaturesPath = os.environ['JOBFEATURES']\n-      machineFeaturesPath = os.environ['MACHINEFEATURES']\n     except KeyError:\n-      self.log.warn( '$JOBFEATURES and/or $MACHINEFEATURES is not set' )\n+      self.log.warn( '$JOBFEATURES is not set' )\n \n-    try:\n-      wallClockLimit = int( urllib.urlopen( jobFeaturesPath + '/wall_limit_secs' ).read() )\n-    except ValueError:\n-      self.log.warn( \"/wall_limit_secs is unreadable\" )\n-    except IOError:\n-      self.log.warn( \"Can't open wall_limit_secs\" )\n+    if jobFeaturesPath:\n+      try:\n+        wallClockLimit = int( urllib.urlopen( jobFeaturesPath + '/wall_limit_secs' ).read() )\n+      except ValueError:\n+        self.log.warn( \"/wall_limit_secs is unreadable\" )","path":"Core/Utilities/TimeLeft/MJFTimeLeft.py","position":66,"original_position":29,"commit_id":"0c28ca8ccb4436f2acfe348cc6dac5859283c9be","original_commit_id":"17f34a48efd9d8a7654839d7a4444aaafc128b2f","user":{"login":"chaen","id":3728211,"avatar_url":"https://avatars.githubusercontent.com/u/3728211?v=3","gravatar_id":"","url":"https://api.github.com/users/chaen","html_url":"https://github.com/chaen","followers_url":"https://api.github.com/users/chaen/followers","following_url":"https://api.github.com/users/chaen/following{/other_user}","gists_url":"https://api.github.com/users/chaen/gists{/gist_id}","starred_url":"https://api.github.com/users/chaen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaen/subscriptions","organizations_url":"https://api.github.com/users/chaen/orgs","repos_url":"https://api.github.com/users/chaen/repos","events_url":"https://api.github.com/users/chaen/events{/privacy}","received_events_url":"https://api.github.com/users/chaen/received_events","type":"User","site_admin":false},"body":"For this exception and all the one bellow, would it be interesting to actually print the exception, in order to see why the file could not be opened, or why it could not be cast to an int ?","created_at":"2016-06-23T12:44:03Z","updated_at":"2016-06-23T12:44:03Z","html_url":"https://github.com/DIRACGrid/DIRAC/pull/3005#discussion_r68226973","pull_request_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005","_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/68226973"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/3005#discussion_r68226973"},"pull_request":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005"}}},"pull_request":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005","id":74644024,"html_url":"https://github.com/DIRACGrid/DIRAC/pull/3005","diff_url":"https://github.com/DIRACGrid/DIRAC/pull/3005.diff","patch_url":"https://github.com/DIRACGrid/DIRAC/pull/3005.patch","issue_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/3005","number":3005,"state":"open","locked":false,"title":"[v6r15] Minor fixes","user":{"login":"fstagni","id":785576,"avatar_url":"https://avatars.githubusercontent.com/u/785576?v=3","gravatar_id":"","url":"https://api.github.com/users/fstagni","html_url":"https://github.com/fstagni","followers_url":"https://api.github.com/users/fstagni/followers","following_url":"https://api.github.com/users/fstagni/following{/other_user}","gists_url":"https://api.github.com/users/fstagni/gists{/gist_id}","starred_url":"https://api.github.com/users/fstagni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstagni/subscriptions","organizations_url":"https://api.github.com/users/fstagni/orgs","repos_url":"https://api.github.com/users/fstagni/repos","events_url":"https://api.github.com/users/fstagni/events{/privacy}","received_events_url":"https://api.github.com/users/fstagni/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-21T16:30:17Z","updated_at":"2016-06-23T12:44:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e66cd0a54870e0d9682d99b6d9b2e429e0230d94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005/commits","review_comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005/comments","review_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/3005/comments","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/0c28ca8ccb4436f2acfe348cc6dac5859283c9be","head":{"label":"fstagni:v6r15-fixes-18","ref":"v6r15-fixes-18","sha":"0c28ca8ccb4436f2acfe348cc6dac5859283c9be","user":{"login":"fstagni","id":785576,"avatar_url":"https://avatars.githubusercontent.com/u/785576?v=3","gravatar_id":"","url":"https://api.github.com/users/fstagni","html_url":"https://github.com/fstagni","followers_url":"https://api.github.com/users/fstagni/followers","following_url":"https://api.github.com/users/fstagni/following{/other_user}","gists_url":"https://api.github.com/users/fstagni/gists{/gist_id}","starred_url":"https://api.github.com/users/fstagni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstagni/subscriptions","organizations_url":"https://api.github.com/users/fstagni/orgs","repos_url":"https://api.github.com/users/fstagni/repos","events_url":"https://api.github.com/users/fstagni/events{/privacy}","received_events_url":"https://api.github.com/users/fstagni/received_events","type":"User","site_admin":false},"repo":{"id":1742442,"name":"DIRAC","full_name":"fstagni/DIRAC","owner":{"login":"fstagni","id":785576,"avatar_url":"https://avatars.githubusercontent.com/u/785576?v=3","gravatar_id":"","url":"https://api.github.com/users/fstagni","html_url":"https://github.com/fstagni","followers_url":"https://api.github.com/users/fstagni/followers","following_url":"https://api.github.com/users/fstagni/following{/other_user}","gists_url":"https://api.github.com/users/fstagni/gists{/gist_id}","starred_url":"https://api.github.com/users/fstagni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fstagni/subscriptions","organizations_url":"https://api.github.com/users/fstagni/orgs","repos_url":"https://api.github.com/users/fstagni/repos","events_url":"https://api.github.com/users/fstagni/events{/privacy}","received_events_url":"https://api.github.com/users/fstagni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fstagni/DIRAC","description":"DIRAC Grid","fork":true,"url":"https://api.github.com/repos/fstagni/DIRAC","forks_url":"https://api.github.com/repos/fstagni/DIRAC/forks","keys_url":"https://api.github.com/repos/fstagni/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fstagni/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fstagni/DIRAC/teams","hooks_url":"https://api.github.com/repos/fstagni/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/fstagni/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/fstagni/DIRAC/events","assignees_url":"https://api.github.com/repos/fstagni/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/fstagni/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/fstagni/DIRAC/tags","blobs_url":"https://api.github.com/repos/fstagni/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fstagni/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fstagni/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/fstagni/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fstagni/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/fstagni/DIRAC/languages","stargazers_url":"https://api.github.com/repos/fstagni/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/fstagni/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/fstagni/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/fstagni/DIRAC/subscription","commits_url":"https://api.github.com/repos/fstagni/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/fstagni/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/fstagni/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/fstagni/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/fstagni/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/fstagni/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fstagni/DIRAC/merges","archive_url":"https://api.github.com/repos/fstagni/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fstagni/DIRAC/downloads","issues_url":"https://api.github.com/repos/fstagni/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/fstagni/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/fstagni/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/fstagni/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fstagni/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/fstagni/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/fstagni/DIRAC/deployments","created_at":"2011-05-13T08:21:03Z","updated_at":"2015-12-11T14:05:00Z","pushed_at":"2016-06-23T12:25:30Z","git_url":"git://github.com/fstagni/DIRAC.git","ssh_url":"git@github.com:fstagni/DIRAC.git","clone_url":"https://github.com/fstagni/DIRAC.git","svn_url":"https://github.com/fstagni/DIRAC","homepage":"http://diracgrid.org","size":39700,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"v6r15-fixes-13"}},"base":{"label":"DIRACGrid:rel-v6r15","ref":"rel-v6r15","sha":"1d3a9c0100da84e3e7730cdfc44327aadf9d8b7b","user":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"repo":{"id":1576831,"name":"DIRAC","full_name":"DIRACGrid/DIRAC","owner":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DIRACGrid/DIRAC","description":"DIRAC Grid","fork":false,"url":"https://api.github.com/repos/DIRACGrid/DIRAC","forks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/forks","keys_url":"https://api.github.com/repos/DIRACGrid/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DIRACGrid/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DIRACGrid/DIRAC/teams","hooks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/events","assignees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/DIRACGrid/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/tags","blobs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/DIRACGrid/DIRAC/languages","stargazers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscription","commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/DIRACGrid/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DIRACGrid/DIRAC/merges","archive_url":"https://api.github.com/repos/DIRACGrid/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DIRACGrid/DIRAC/downloads","issues_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/DIRACGrid/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/DIRACGrid/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DIRACGrid/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/DIRACGrid/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/deployments","created_at":"2011-04-06T11:47:53Z","updated_at":"2016-06-21T22:18:29Z","pushed_at":"2016-06-23T12:43:06Z","git_url":"git://github.com/DIRACGrid/DIRAC.git","ssh_url":"git@github.com:DIRACGrid/DIRAC.git","clone_url":"https://github.com/DIRACGrid/DIRAC.git","svn_url":"https://github.com/DIRACGrid/DIRAC","homepage":"http://diracgrid.org","size":61455,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":103,"forks":95,"open_issues":103,"watchers":49,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/3005"},"issue":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/3005"},"comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/3005/comments"},"review_comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005/comments"},"review_comment":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/3005/commits"},"statuses":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/0c28ca8ccb4436f2acfe348cc6dac5859283c9be"}}}}
{"actor":{"display_login":"chaen"}}