[Pywikipedia-l] SVN: [5965] trunk/pywikipedia/djvutext.py

jayvdb at svn.wikimedia.org jayvdb at svn.wikimedia.org
Tue Oct 14 06:29:16 UTC 2008


Revision: 5965
Author:   jayvdb
Date:     2008-10-14 06:29:16 +0000 (Tue, 14 Oct 2008)

Log Message:
-----------
Bugfix: calling without arguments resulted in errors

Modified Paths:
--------------
    trunk/pywikipedia/djvutext.py

Modified: trunk/pywikipedia/djvutext.py
===================================================================
--- trunk/pywikipedia/djvutext.py	2008-10-14 05:55:56 UTC (rev 5964)
+++ trunk/pywikipedia/djvutext.py	2008-10-14 06:29:16 UTC (rev 5965)
@@ -209,11 +209,12 @@
             print "Unknown argument %s" % arg
 
     # Check the djvu file exists
-    os.stat(djvu)
+    if djvu:
+        os.stat(djvu)
 
-    if not index:
-        import os.path
-        index = os.path.basename(djvu)
+        if not index:
+            import os.path
+            index = os.path.basename(djvu)
 
     if djvu and index:
         site = wikipedia.getSite()





More information about the Pywikipedia-l mailing list