{"action":"created","issue":{"url":"https://api.github.com/repos/copycat-killer/lain/issues/208","repository_url":"https://api.github.com/repos/copycat-killer/lain","labels_url":"https://api.github.com/repos/copycat-killer/lain/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/copycat-killer/lain/issues/208/comments","events_url":"https://api.github.com/repos/copycat-killer/lain/issues/208/events","html_url":"https://github.com/copycat-killer/lain/issues/208","id":162334135,"number":208,"title":"bat.lua breaks when current_now isn't present","user":{"login":"jdreaver","id":1253071,"avatar_url":"https://avatars.githubusercontent.com/u/1253071?v=3","gravatar_id":"","url":"https://api.github.com/users/jdreaver","html_url":"https://github.com/jdreaver","followers_url":"https://api.github.com/users/jdreaver/followers","following_url":"https://api.github.com/users/jdreaver/following{/other_user}","gists_url":"https://api.github.com/users/jdreaver/gists{/gist_id}","starred_url":"https://api.github.com/users/jdreaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdreaver/subscriptions","organizations_url":"https://api.github.com/users/jdreaver/orgs","repos_url":"https://api.github.com/users/jdreaver/repos","events_url":"https://api.github.com/users/jdreaver/events{/privacy}","received_events_url":"https://api.github.com/users/jdreaver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-26T16:04:58Z","updated_at":"2016-06-26T18:13:22Z","closed_at":null,"body":"First of all, thanks for making this awesome library! I've been using it for years.\r\n\r\nMy battery doesn't have a `/current_now` file available for whatever reason. I noticed that you check [here](https://github.com/copycat-killer/lain/blob/master/widgets/bat.lua#L101) if `rate_current` is a null-value and just use zero instead. However, [here](https://github.com/copycat-killer/lain/blob/master/widgets/bat.lua#L104) `rate_current` is used without the check. This is where I get an error. I fixed this by changing `rate_current` to `(rate_current or 0)`.\r\n\r\nI'm not exactly sure what commit caused this issue, but it looks like you are already aware that `/current_now` could be nonexistent. I would make a PR, but I don't have any sort of development environment set up for lua."},"comment":{"url":"https://api.github.com/repos/copycat-killer/lain/issues/comments/228614370","html_url":"https://github.com/copycat-killer/lain/issues/208#issuecomment-228614370","issue_url":"https://api.github.com/repos/copycat-killer/lain/issues/208","id":228614370,"user":{"login":"copycat-killer","id":1777696,"avatar_url":"https://avatars.githubusercontent.com/u/1777696?v=3","gravatar_id":"","url":"https://api.github.com/users/copycat-killer","html_url":"https://github.com/copycat-killer","followers_url":"https://api.github.com/users/copycat-killer/followers","following_url":"https://api.github.com/users/copycat-killer/following{/other_user}","gists_url":"https://api.github.com/users/copycat-killer/gists{/gist_id}","starred_url":"https://api.github.com/users/copycat-killer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copycat-killer/subscriptions","organizations_url":"https://api.github.com/users/copycat-killer/orgs","repos_url":"https://api.github.com/users/copycat-killer/repos","events_url":"https://api.github.com/users/copycat-killer/events{/privacy}","received_events_url":"https://api.github.com/users/copycat-killer/received_events","type":"User","site_admin":false},"created_at":"2016-06-26T18:13:22Z","updated_at":"2016-06-26T18:13:22Z","body":"I've just updated the AUR package. Let me know."}}
{"actor":{"display_login":"copycat-killer"}}