summaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorjeh <jeh@FreeBSD.org>2003-11-22 02:15:36 +0000
committerjeh <jeh@FreeBSD.org>2003-11-22 02:15:36 +0000
commit9b3711e4ea782d62192c5a8b86126fcd4c96ba4b (patch)
treefe9f10a900afb8ffb30e4eb6aeead1885ffb8761 /astro
parent2c36b2d690ea1ff21dd08539f23ecbc97c120554 (diff)
downloadFreeBSD-ports-9b3711e4ea782d62192c5a8b86126fcd4c96ba4b.zip
FreeBSD-ports-9b3711e4ea782d62192c5a8b86126fcd4c96ba4b.tar.gz
When the clock is at 12am and it will crash.
Reported by: Franz Klammer PR: 59561 Submitted by: MAINTAINER
Diffstat (limited to 'astro')
-rw-r--r--astro/gdesklets-goodweather/Makefile3
-rw-r--r--astro/gdesklets-goodweather/files/GoodWeather::weather.py14
2 files changed, 16 insertions, 1 deletions
diff --git a/astro/gdesklets-goodweather/Makefile b/astro/gdesklets-goodweather/Makefile
index f7b250d..df6cc6b 100644
--- a/astro/gdesklets-goodweather/Makefile
+++ b/astro/gdesklets-goodweather/Makefile
@@ -7,7 +7,7 @@
PORTNAME= goodweather
PORTVERSION= 0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro gnome
MASTER_SITES= http://gdesklets.gnomedesktop.org/files/ \
http://people.roqe.org/kr/misc/
@@ -31,6 +31,7 @@ SKINS= liquid um weather.com
do-build:
@${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC}
@${PATCH} ${WRKSRC}/${NAME}/__init__.py < ${FILESDIR}/${NAME}::__init__.py
+ @${PATCH} ${WRKSRC}/${NAME}/weather.py < ${FILESDIR}/${NAME}::weather.py
@${FIND} ${WRKSRC} -name '*.orig' -delete
do-install:
diff --git a/astro/gdesklets-goodweather/files/GoodWeather::weather.py b/astro/gdesklets-goodweather/files/GoodWeather::weather.py
new file mode 100644
index 0000000..a84ead8
--- /dev/null
+++ b/astro/gdesklets-goodweather/files/GoodWeather::weather.py
@@ -0,0 +1,14 @@
+--- GoodWeather/weather.py.orig Thu Nov 20 16:29:11 2003
++++ GoodWeather/weather.py Thu Nov 20 16:30:24 2003
+@@ -321,8 +321,9 @@
+ if m :
+ #print m
+ if m.upper() == 'AM':
+- if int(self._hour) > 11:
+- raise ValueError ('AM hour can not be over 11 ['+ self._hour +']')
++ if int(self._hour) > 12:
++ raise ValueError ('AM hour can not be over 12 ['+ self._hour +']')
++ if int(self._hour) == 12: self._hour = str(0)
+ if m.upper() == 'PM':
+ if int(self._hour) > 12:
+ raise ValueError ('PM hour can not be over 12 ['+ self._hour +']')
OpenPOWER on IntegriCloud