Index: pkpgcounter/trunk/pkpgpdls/pdlparser.py
===================================================================
--- pkpgcounter/trunk/pkpgpdls/pdlparser.py (revision 3410)
+++ pkpgcounter/trunk/pkpgpdls/pdlparser.py (revision 3436)
@@ -8,10 +8,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -25,6 +25,6 @@
 import os
 
-KILOBYTE = 1024    
-MEGABYTE = 1024 * KILOBYTE    
+KILOBYTE = 1024
+MEGABYTE = 1024 * KILOBYTE
 FIRSTBLOCKSIZE = 16 * KILOBYTE
 LASTBLOCKSIZE = int(KILOBYTE / 4)
@@ -38,5 +38,5 @@
         return self.message
     __str__ = __repr__
-        
+
 class PDLParser :
     """Generic PDL parser."""
@@ -56,11 +56,11 @@
         if not self.isValid() :
             raise PDLParserError, "Invalid file format !"
-        else :    
+        else :
             self.logdebug("Input file is in the '%s' file format." % self.format)
         try :
-            import psyco 
-        except ImportError :    
+            import psyco
+        except ImportError :
             pass # Psyco is not installed
-        else :    
+        else :
             # Psyco is installed, tell it to compile
             # the CPU intensive methods : PCL and PCLXL
@@ -69,10 +69,10 @@
         self.infile = open(self.filename, self.openmode)
         # self.logdebug("Opened %s in '%s' mode." % (self.filename, self.openmode))
-            
+
     def __del__(self) :
         """Ensures the input file gets closed."""
         if self.infile :
             self.infile.close()
-            
+
     def findExecutable(self, command) :
         """Finds an executable in the PATH and returns True if found else False."""
@@ -83,7 +83,7 @@
                     return True
         return False
-        
-    def isMissing(self, commands) :    
-        """Returns True if some required commands are missing, else False.""" 
+
+    def isMissing(self, commands) :
+        """Returns True if some required commands are missing, else False."""
         howmanythere = 0
         for command in commands :
@@ -91,28 +91,28 @@
                 sys.stderr.write("ERROR: %(command)s is missing or not executable. You MUST install it for pkpgcounter to be able to do what you want.\n" % locals())
                 sys.stderr.flush()
-            else :    
+            else :
                 howmanythere += 1
         if howmanythere == len(commands) :
             return False
-        else :   
+        else :
             return True
-        
-    def logdebug(self, message) :       
+
+    def logdebug(self, message) :
         """Logs a debug message if needed."""
         if self.parent.options.debug :
             sys.stderr.write("%s\n" % message)
-            
-    def isValid(self) :    
+
+    def isValid(self) :
         """Returns True if data is in the expected format, else False."""
         raise RuntimeError, "Not implemented !"
-        
-    def getJobSize(self) :    
+
+    def getJobSize(self) :
         """Counts pages in a document."""
         raise RuntimeError, "Not implemented !"
-        
+
     def convertToTiffMultiPage24NC(self, outfname, dpi) :
         """Converts the input file to TIFF format, X dpi, 24 bits per pixel, uncompressed.
            Writes TIFF datas to the file named by outfname.
-        """   
+        """
         if self.totiffcommands :
             if self.isMissing(self.required) :
@@ -127,5 +127,5 @@
                     if os.WEXITSTATUS(status) :
                         error = True
-                else :        
+                else :
                     error = True
                 if not os.path.exists(outfname) :
@@ -133,9 +133,9 @@
                 elif not os.stat(outfname).st_size :
                     error = True
-                else :        
+                else :
                     break       # Conversion worked fine it seems.
                 sys.stderr.write("Command failed : %s\n" % repr(commandline))
             if error :
                 raise PDLParserError, "Problem during conversion to TIFF."
-        else :        
+        else :
             raise PDLParserError, "Impossible to compute ink coverage for this file format."
