rpms/ghost-diagrams/devel ghost-diagrams-0.8-exceptions.patch, NONE, 1.1 ghost-diagrams.spec, 1.2, 1.3
Ignacio Vazquez-Abrams (ivazquez)
fedora-extras-commits at redhat.com
Mon Feb 4 10:08:36 UTC 2008
- Previous message (by thread): rpms/ghost-diagrams/F-8 ghost-diagrams-0.8-exceptions.patch, NONE, 1.1 ghost-diagrams.spec, 1.2, 1.3
- Next message (by thread): rpms/obex-data-server/devel .cvsignore, 1.2, 1.3 obex-data-server.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ivazquez
Update of /cvs/pkgs/rpms/ghost-diagrams/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15061/devel
Modified Files:
ghost-diagrams.spec
Added Files:
ghost-diagrams-0.8-exceptions.patch
Log Message:
Converted string exceptions to object exceptions (#431338)
ghost-diagrams-0.8-exceptions.patch:
--- NEW FILE ghost-diagrams-0.8-exceptions.patch ---
? ghost-diagrams-0.8-exceptions.patch
Index: ghost-diagrams-0.8.py
===================================================================
RCS file: /cvs/pkgs/rpms/ghost-diagrams/F-8/ghost-diagrams-0.8.py,v
retrieving revision 1.1
diff -u -r1.1 ghost-diagrams-0.8.py
--- ghost-diagrams-0.8.py 1 Feb 2008 19:50:03 -0000 1.1
+++ ghost-diagrams-0.8.py 3 Feb 2008 03:00:42 -0000
@@ -88,6 +88,9 @@
import sys, os, random, gtk, pango, gobject, string, math, sets
+class DiagramException(Exception):
+ pass
+
class Point:
def __init__(self, x,y):
self.x = x
@@ -259,11 +262,11 @@
forms = list(forms)
- if len(forms) < 1: raise "error"
+ if len(forms) < 1: raise DiagramException("Not enough forms")
for item in forms:
if type(item) != type(""):
- raise "error"
+ raise DiagramException("All forms must be of type str")
for i in xrange(len(forms)):
if "/" in forms[i]:
@@ -280,10 +283,10 @@
for item in forms:
if len(item) != len(self.connections):
- raise "error"
+ raise DiagramException("All forms must be of the same length")
for edge in item:
if edge not in compatabilities:
- raise "error"
+ raise DiagramError("Invalid edge '%s' specified" % edge)
self.forms = forms
@@ -1039,15 +1042,15 @@
random.shuffle(item)
item = normalize(string.join(item,''))
- if item in result: raise "repeat"
+ if item in result: raise DiagramException("Form already seen")
result.append(item)
all = string.join(result,'')
for a, b in compatabilities.items():
- if a in all and b not in all: raise "repeat"
+ if a in all and b not in all: raise DiagramException("Duplicate match found")
break
- except "repeat":
+ except DiagramException:
pass
self.combo.entry.set_text(repr(result)[1:-1])
Index: ghost-diagrams.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghost-diagrams/devel/ghost-diagrams.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ghost-diagrams.spec 1 Feb 2008 20:35:56 -0000 1.2
+++ ghost-diagrams.spec 4 Feb 2008 10:08:00 -0000 1.3
@@ -1,6 +1,6 @@
Name: ghost-diagrams
Version: 0.8
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A program that generates patterns from tiles
Group: Amusements/Graphics
@@ -8,6 +8,7 @@
URL: http://logarithmic.net/pfh/ghost-diagrams
Source0: http://logarithmic.net/pfh-files/ghost-diagrams/%{name}-%{version}.py
Source1: ghost-diagrams.png
+Patch0: ghost-diagrams-0.8-exceptions.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -20,12 +21,15 @@
randomly chosen tiles are often surprising.
%prep
+%setup -q -T -c
+cp -p %{SOURCE0} .
+%patch0 -p 0 -b .exceptions
%build
%install
rm -rf $RPM_BUILD_ROOT
-install -p -m 0644 -D %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.py
+install -p -m 0644 -D %{name}-%{version}.py $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.py
sed -i -e 1d $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.py
install -p -m 0644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
mkdir -p $RPM_BUILD_ROOT%{_bindir}
@@ -62,6 +66,9 @@
%{_datadir}/pixmaps/%{name}.*
%changelog
+* Sat Feb 2 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> 0.8-3
+- Converted string exceptions to object exceptions (#431338)
+
* Fri Feb 1 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> 0.8-2
- Added an icon
- Previous message (by thread): rpms/ghost-diagrams/F-8 ghost-diagrams-0.8-exceptions.patch, NONE, 1.1 ghost-diagrams.spec, 1.2, 1.3
- Next message (by thread): rpms/obex-data-server/devel .cvsignore, 1.2, 1.3 obex-data-server.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list