1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

When the clock is at 12am and it will crash.

Reported by:	Franz Klammer

PR:		59561
Submitted by:	MAINTAINER
This commit is contained in:
James E. Housley 2003-11-22 02:15:36 +00:00
parent c1120672c3
commit 494cce4f6e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94691
2 changed files with 16 additions and 1 deletions

View File

@ -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:

View File

@ -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 +']')