diff options
author | 2023-01-09 15:04:41 -0600 | |
---|---|---|
committer | 2023-01-09 15:04:41 -0600 | |
commit | b24900001c81f52fef8240ac279b385798b657b9 (patch) | |
tree | 621127faf31c248e209431495b0e0333f180fa28 /_plugins | |
parent | mips downloads: layout (diff) | |
download | www-b24900001c81f52fef8240ac279b385798b657b9.tar.gz www-b24900001c81f52fef8240ac279b385798b657b9.tar.bz2 www-b24900001c81f52fef8240ac279b385798b657b9.zip |
devaway: try not crashing if devaway file is empty
Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/devaway.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_plugins/devaway.rb b/_plugins/devaway.rb index f28bfa7..dab9696 100644 --- a/_plugins/devaway.rb +++ b/_plugins/devaway.rb @@ -14,6 +14,13 @@ module Gentoo data.xpath('/devaway/dev').each do |dev| reason = dev.xpath('./reason/text()').first.content + if reason.nil? + puts dev['nick'] + " has an empty devaway!" + next + end + + reason = reason.content + date_match = DATE_REGEXP.match(reason) if not date_match.nil? reason = date_match.pre_match.rstrip() |