Package: python-networkx / 1.9+dfsg1-1

python-3.4.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Backport python3 fixes.
Author: Chuck Short <zulcss@ubuntu.com>
Forwarded: Not needed
diff -Naurp networkx-1.8.1.orig/networkx/readwrite/nx_shp.py networkx-1.8.1/networkx/readwrite/nx_shp.py
--- networkx-1.8.1.orig/networkx/readwrite/nx_shp.py	2013-08-04 09:53:31.000000000 -0400
+++ networkx-1.8.1/networkx/readwrite/nx_shp.py	2014-01-27 10:57:47.015239061 -0500
@@ -154,7 +154,7 @@ def write_shp(G, outdir):
         feature.SetGeometry(g)
         if attributes != None:
             # Loop through attributes, assigning data to each field
-            for field, data in attributes.iteritems():
+            for field, data in attributes.iter():
                 feature.SetField(field, data)
         lyr.CreateFeature(feature)
         feature.Destroy()
@@ -189,7 +189,7 @@ def write_shp(G, outdir):
         data = G.get_edge_data(*e)
         g = netgeometry(e, data)
         # Loop through attribute data in edges
-        for key, data in e[2].iteritems():
+        for key, data in e[2].iter():
             # Reject spatial data not required for attribute table
             if (key != 'Json' and key != 'Wkt' and key != 'Wkb'
                 and key != 'ShpName'):