@@ -23,7 +23,7 @@ def main():
2323 # Strip '-P' from printer names just in case
2424 # the user specified it...
2525 for i in range (len (printers )):
26- if printers [i ][:2 ] = '-P' :
26+ if printers [i ][:2 ] == '-P' :
2727 printers [i ] = printers [i ][2 :]
2828 else :
2929 if posix .environ .has_key ('PRINTER' ):
@@ -54,13 +54,13 @@ def makestatus(name, thisuser):
5454 if not line : break
5555 fields = string .split (line )
5656 n = len (fields )
57- if len (fields ) >= 6 and fields [n - 1 ] = 'bytes' :
57+ if len (fields ) >= 6 and fields [n - 1 ] == 'bytes' :
5858 rank = fields [0 ]
5959 user = fields [1 ]
6060 job = fields [2 ]
6161 files = fields [3 :- 2 ]
6262 bytes = eval (fields [n - 2 ])
63- if user = thisuser :
63+ if user == thisuser :
6464 userseen = 1
6565 elif not userseen :
6666 aheadbytes = aheadbytes + bytes
@@ -77,22 +77,22 @@ def makestatus(name, thisuser):
7777 else :
7878 if fields and fields [0 ] <> 'Rank' :
7979 line = string .strip (line )
80- if line = 'no entries' :
80+ if line == 'no entries' :
8181 line = name + ': idle'
82- elif line [- 22 :] = ' is ready and printing' :
82+ elif line [- 22 :] == ' is ready and printing' :
8383 line = name
8484 lines .append (line )
8585 #
8686 if totaljobs :
8787 line = `(totalbytes+1023)/1024` + ' K'
8888 if totaljobs <> len (users ):
8989 line = line + ' (' + `totaljobs` + ' jobs)'
90- if len (users ) = 1 :
90+ if len (users ) == 1 :
9191 line = line + ' for ' + users .keys ()[0 ]
9292 else :
9393 line = line + ' for ' + `len(users)` + ' users'
9494 if userseen :
95- if aheadjobs = 0 :
95+ if aheadjobs == 0 :
9696 line = line + ' (' + thisuser + ' first)'
9797 else :
9898 line = line + ' (' + `(aheadbytes+1023)/1024`
0 commit comments