Etienne Chové a scris: > Etienne Chové a écrit : >> Dears, >> >> I wrote a python class to communicate with OSM API (read, write, >> update). For interested users, informations are here [1]. >> >> May I put sources on the dev server ? > > This is now hosted on the main osm svn repositrory. I appologize for > people wanting it on an external repository but I prefer to put it on an > osm server. > > It's now at : http://svn.openstreetmap.org/applications/utils/python_lib/ > > Thanks to Eddy Petrișor for some bugfix and ideas proposed on his > repository.
And I have a first bug fix, too. There is a spelling error in the code. See attachment. -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein
From 9a6233d0f5971feae07cc5f2f59567b9f4896dd7 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Eddy=20Petri=C8=99or?= <[email protected]> Date: Mon, 4 May 2009 03:32:03 +0300 Subject: [PATCH] bugfix: fix spelling of 'Exception' --- OsmApi.py | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmApi.py b/OsmApi.py index 89f4924..05a86c9 100644 --- a/OsmApi.py +++ b/OsmApi.py @@ -133,7 +133,7 @@ class OsmApi: def WayUpdate(self, WayData): """ Updates way with WayData. Returns updated WayData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" WayData[u"changeset"] = self._CurrentChangesetId result = self._put("/api/0.6/way/"+str(WayData[u"id"]), self._XmlBuild("way", WayData)) WayData[u"version"] = int(result.strip()) @@ -143,7 +143,7 @@ class OsmApi: def WayDelete(self, WayData): """ Delete way with WayData. Returns updated WayData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" WayData[u"changeset"] = self._CurrentChangesetId result = self._delete("/api/0.6/way/"+str(WayData[u"id"]), self._XmlBuild("way", WayData)) WayData[u"version"] = int(result.strip()) @@ -154,7 +154,7 @@ class OsmApi: def WayCreate(self, WayData): """ Creates a way. Returns updated WayData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" WayData[u"changeset"] = self._CurrentChangesetId result = self._put("/api/0.6/way/create", self._XmlBuild("way", WayData)) WayData[u"id"] = int(result.strip()) @@ -203,7 +203,7 @@ class OsmApi: def RelationUpdate(self, RelationData): """ Updates relation with RelationData. Returns updated RelationData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" RelationData[u"changeset"] = self._CurrentChangesetId result = self._put("/api/0.6/relation/"+str(RelationData[u"id"]), self._XmlBuild("relation", RelationData)) RelationData[u"version"] = int(result.strip()) @@ -213,7 +213,7 @@ class OsmApi: def RelationDelete(self, RelationData): """ Delete relation with RelationData. Returns updated RelationData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" RelationData[u"changeset"] = self._CurrentChangesetId result = self._delete("/api/0.6/relation/"+str(RelationData[u"id"]), self._XmlBuild("relation", RelationData)) RelationData[u"version"] = int(result.strip()) @@ -224,7 +224,7 @@ class OsmApi: def RelationCreate(self, RelationData): """ Creates a relation. Returns updated RelationData (without timestamp). """ if self._CurrentChangesetId == -1: - raise Execption, "No changeset currently opened" + raise Exception, "No changeset currently opened" RelationData[u"changeset"] = self._CurrentChangesetId result = self._put("/api/0.6/relation/create", self._XmlBuild("relation", RelationData)) RelationData[u"id"] = int(result.strip()) -- 1.5.6.5
signature.asc
Description: OpenPGP digital signature
_______________________________________________ talk mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk

