[Python-modules-commits] r13552 - in packages/python-networkx/trunk/debian (3 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Wed Jun 23 05:27:22 UTC 2010


    Date: Wednesday, June 23, 2010 @ 05:27:17
  Author: morph
Revision: 13552

* debian/patches/changeset_r1745.diff
  - replace string exceptions, removed from python >= 2.6; Closes: #585307

Added:
  packages/python-networkx/trunk/debian/patches/changeset_r1745.diff
Modified:
  packages/python-networkx/trunk/debian/changelog
  packages/python-networkx/trunk/debian/patches/series

Modified: packages/python-networkx/trunk/debian/changelog
===================================================================
--- packages/python-networkx/trunk/debian/changelog	2010-06-23 00:07:36 UTC (rev 13551)
+++ packages/python-networkx/trunk/debian/changelog	2010-06-23 05:27:17 UTC (rev 13552)
@@ -7,8 +7,10 @@
   * debian/rules
     - remove 2 doc files not needed (they are actually broken symlinks); thanks
       to Ian Zimmerman for the report; Closes: #580839
+  * debian/patches/changeset_r1745.diff
+    - replace string exceptions, removed from python >= 2.6; Closes: #585307
 
- -- Sandro Tosi <morph at debian.org>  Wed, 23 Jun 2010 00:14:17 +0200
+ -- Sandro Tosi <morph at debian.org>  Wed, 23 Jun 2010 07:12:25 +0200
 
 python-networkx (1.1-1) unstable; urgency=low
 

Added: packages/python-networkx/trunk/debian/patches/changeset_r1745.diff
===================================================================
--- packages/python-networkx/trunk/debian/patches/changeset_r1745.diff	                        (rev 0)
+++ packages/python-networkx/trunk/debian/patches/changeset_r1745.diff	2010-06-23 05:27:17 UTC (rev 13552)
@@ -0,0 +1,101 @@
+Index: networkx/examples/graph/words.py
+===================================================================
+--- networkx/examples/graph/words.py (revision 1429)
++++ networkx/examples/graph/words.py (revision 1745)
+@@ -61,11 +61,8 @@
+     # open file words_dat.txt.gz (or words_dat.txt)
+     try:
+-        try:
+-            import gzip
+-            fh=gzip.open('words_dat.txt.gz','r')
+-        except:
+-            fh=open("words_dat.txt","r")
+-    except IOError:
+-        raise "File words_dat.txt not found."
++        import gzip
++        fh=gzip.open('words_dat.txt.gz','r')
++    except:
++        fh=open("words_dat.txt","r")
+ 
+     G = Graph(name="words")
+Index: networkx/examples/graph/football.py
+===================================================================
+--- networkx/examples/graph/football.py (revision 1690)
++++ networkx/examples/graph/football.py (revision 1745)
+@@ -20,6 +20,6 @@
+ try:
+     import pyparsing
+-except ImportError:
+-    raise "pyparsing not found: install http://pyparsing.wikispaces.com/"
++except ImportError,e:
++    raise ImportError(str(e)+". Check http://pyparsing.wikispaces.com/")
+     
+ from networkx import *
+@@ -27,5 +27,5 @@
+ url="http://www-personal.umich.edu/~mejn/netdata/football.zip"
+ 
+-import urllib                                       
++import urllib
+ import StringIO
+ import zipfile
+@@ -33,5 +33,5 @@
+ sock = urllib.urlopen(url)  # open URL
+ s=StringIO.StringIO(sock.read()) # read into StringIO "file"
+-sock.close()                                        
++sock.close()
+ 
+ zf = zipfile.ZipFile(s) # zipfile object
+Index: networkx/examples/graph/roget.py
+===================================================================
+--- networkx/examples/graph/roget.py (revision 1429)
++++ networkx/examples/graph/roget.py (revision 1745)
+@@ -42,11 +42,8 @@
+     # open file roget_dat.txt.gz (or roget_dat.txt)
+     try:
+-        try:
+-            import gzip
+-            fh=gzip.open('roget_dat.txt.gz','r')
+-        except:
+-            fh=open("roget_dat.txt","r")
+-    except IOError:
+-        raise "File roget_dat.txt not found."
++        import gzip
++        fh=gzip.open('roget_dat.txt.gz','r')
++    except:
++        fh=open("roget_dat.txt","r")
+ 
+     G=DiGraph()
+Index: networkx/examples/graph/knuth_miles.py
+===================================================================
+--- networkx/examples/graph/knuth_miles.py (revision 1429)
++++ networkx/examples/graph/knuth_miles.py (revision 1745)
+@@ -36,11 +36,8 @@
+     # open file miles_dat.txt.gz (or miles_dat.txt)
+     try:
+-        try:
+-            import gzip
+-            fh = gzip.open('knuth_miles.txt.gz','r')
+-        except:
+-            fh=open("knuth_miles.txt","r")
+-    except IOError:
+-        raise "File knuth_miles.txt not found."
++        import gzip
++        fh = gzip.open('knuth_miles.txt.gz','r')
++    except:
++        fh=open("knuth_miles.txt","r")
+ 
+     G=nx.Graph()
+Index: networkx/examples/algorithms/blockmodel.py
+===================================================================
+--- networkx/examples/algorithms/blockmodel.py (revision 1541)
++++ networkx/examples/algorithms/blockmodel.py (revision 1745)
+@@ -50,8 +50,5 @@
+ 
+ if __name__ == '__main__':
+-    try:
+-        G=nx.read_edgelist("hartford_drug.edgelist")
+-    except IOError:
+-        raise "hartford_drug.edgelist not found"
++    G=nx.read_edgelist("hartford_drug.edgelist")
+     
+     # Extract largest connected component into graph H

Modified: packages/python-networkx/trunk/debian/patches/series
===================================================================
--- packages/python-networkx/trunk/debian/patches/series	2010-06-23 00:07:36 UTC (rev 13551)
+++ packages/python-networkx/trunk/debian/patches/series	2010-06-23 05:27:17 UTC (rev 13552)
@@ -1,2 +1,3 @@
 10_doc_relocation
 20_example_dirs_remove
+changeset_r1745.diff




More information about the Python-modules-commits mailing list