Index: pykota/trunk/bin/pykotme
===================================================================
--- pykota/trunk/bin/pykotme (revision 3411)
+++ pykota/trunk/bin/pykotme (revision 3413)
@@ -9,10 +9,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/>.
@@ -34,6 +34,6 @@
 from pykota.tool import PyKotaTool
 from pykota.accounter import openAccounter
-    
-class PyKotMe(PyKotaTool) :        
+
+class PyKotMe(PyKotaTool) :
     """A class for pykotme."""
     def main(self, files, options) :
@@ -46,29 +46,29 @@
             # TODO : over the second printer below.
             files.append("-")
-            
+
         printers = self.storage.getMatchingPrinters(options.printer)
         if not printers :
             raise PyKotaCommandLineError, _("There's no printer matching %s") % options.printer
-            
+
         username = pwd.getpwuid(os.getuid())[0]
         if options.user :
             if not self.config.isAdmin :
                 self.printInfo(_("The --user command line option will be ignored because you are not a PyKota Administrator."), "warn")
-            else :    
+            else :
                 username = options.user
-            
+
         user = self.storage.getUser(username)
         if not user.Exists :
             self.printInfo(_("There's no user matching '%(username)s'.") \
                                               % locals(),
-                           "error")                   
-        else :                   
+                           "error")
+        else :
             if user.LimitBy and (user.LimitBy.lower() == "balance"):
                 self.display("%s\n" % (_("Your account balance : %.2f") % (user.AccountBalance or 0.0)))
-            
+
             sizeprinted = False
             done = {}
             for printer in printers :
-                # Now fake some values. TODO : improve API to not need this anymore    
+                # Now fake some values. TODO : improve API to not need this anymore
                 printername = printer.Name
                 self.PrinterName = printer.Name
@@ -77,7 +77,7 @@
                 key = self.preaccounter.name + self.preaccounter.arguments
                 if not done.has_key(key) :
-                    totalsize = 0    
+                    totalsize = 0
                     inkusage = []
-                    for filename in files :    
+                    for filename in files :
                         self.DataFile = filename
                         self.preaccounter.beginJob(None)
@@ -85,7 +85,7 @@
                         totalsize += self.preaccounter.getJobSize(None)
                         inkusage.extend(self.preaccounter.inkUsage)
-                    done[key] = (totalsize, inkusage)    
-                (totalsize, inkusage) = done[key]    
-                if not sizeprinted :    
+                    done[key] = (totalsize, inkusage)
+                (totalsize, inkusage) = done[key]
+                if not sizeprinted :
                     self.display("%s\n" % (_("Job size : %i pages") % totalsize))
                     sizeprinted = True
@@ -94,16 +94,16 @@
                     if printer.MaxJobSize and (totalsize > printer.MaxJobSize) :
                         self.display("%s\n" % (_("User %(username)s is not allowed to print so many pages on printer %(printername)s at this time.") % locals()))
-                    else :    
+                    else :
                         cost = userpquota.computeJobPrice(totalsize, inkusage)
                         msg = _("Cost on printer %s : %.2f") % (printer.Name, cost)
                         if printer.PassThrough :
                             msg = "%s (%s)" % (msg, _("won't be charged, printer is in passthrough mode"))
-                        elif user.LimitBy == "nochange" :    
+                        elif user.LimitBy == "nochange" :
                             msg = "%s (%s)" % (msg, _("won't be charged, account is immutable"))
                         self.display("%s\n" % msg)
             if user.LimitBy == "noprint" :
                 self.display("%s\n" % (_("User %(username)s is forbidden to print at this time.") % locals()))
-            
-if __name__ == "__main__" : 
+
+if __name__ == "__main__" :
     parser = PyKotaOptionParser(description=_("Generates print quotes for end users."),
                                 usage="pykotme [options] [files]")
@@ -116,5 +116,5 @@
                             help=_("Acts on this user only. Only one username can be specified this way. The default value is the name of the user who launched this command. This option is ignored when the command is not launched by a PyKota Administrator."))
 
-    parser.add_example("--printer apple file1.ps <file2.pclxl",                            
+    parser.add_example("--printer apple file1.ps <file2.pclxl",
                        _("This would show the number of pages needed to print these two files, as well as the cost of printing them to the 'apple' printer for the user who launched this command."))
     parser.add_example("--user john",
