summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Housley <jeh@FreeBSD.org>2003-11-22 02:15:36 +0000
committerJames E. Housley <jeh@FreeBSD.org>2003-11-22 02:15:36 +0000
commit494cce4f6ebcb67db9e3eabf7fc1b6393aa6a39f (patch)
treedba4848187882dde975ec4b9c829df054ea3b60b
parent- Fix build on 5.x (diff)
When the clock is at 12am and it will crash.
Reported by: Franz Klammer PR: 59561 Submitted by: MAINTAINER
Notes
Notes: svn path=/head/; revision=94691
-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 f7b250d0371c..df6cc6b6820a 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 000000000000..a84ead81ad30
--- /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 +']')