Snapshot release 20030306-0908

Charles Cazabon <[email protected]> 6 Mar 2003 15:09:07 -0000
Newsgroups gmane.mail.bikini.devel
Message-ID <[email protected]>

Snapshot 20030306-0908 released and uploaded.  From the CHANGELOG:


Diff follows.

diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/classes.py bikini-20030306-0908/bikini/classes.py
--- bikini-20030305-1533/bikini/classes.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/classes.py	Thu Mar  6 09:08:42 2003
@@ -72,7 +72,7 @@
                 if len (parts) >= 2:
                     args = parts[1:]
                 return cmd, args
-            except IOError, o:
+            except IOError:
                 continue
 
     ###################################
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/client.py bikini-20030306-0908/bikini/client.py
--- bikini-20030305-1533/bikini/client.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/client.py	Thu Mar  6 09:08:42 2003
@@ -154,9 +154,8 @@
     except SystemExit:
         raise
 
-    except UnhandledException, txt:
+    except UnhandledException:
         log (FATAL, '\nbikini-client.py bug:  please include the following information in any bug report:\n\n')
-        log (FATAL, '  bikini-client.py version %s\n' % __version__)
         log (FATAL, '  Python version %s\n\n' % sys.version)
         log (FATAL, 'Unhandled exception follows:\n')
         exc_type, value, tb = sys.exc_info ()
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/pwcheck.py bikini-20030306-0908/bikini/pwcheck.py
--- bikini-20030305-1533/bikini/pwcheck.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/pwcheck.py	Thu Mar  6 09:08:42 2003
@@ -1,4 +1,3 @@
-import popen2
 import os
 import time
 
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/server.py bikini-20030306-0908/bikini/server.py
--- bikini-20030305-1533/bikini/server.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/server.py	Thu Mar  6 09:08:42 2003
@@ -149,12 +149,12 @@
             assert_maildir (folder)
             new = os.listdir (os.path.join (folder, 'new'))
             cur = os.listdir (os.path.join (folder, 'cur'))
-            dict = {}
+            d = {}
             for f in new:
-                dict[stripflags (f)] = 'new/%s' % f
+                d[stripflags (f)] = 'new/%s' % f
             for f in cur:
-                dict[stripflags (f)] = 'cur/%s' % f
-            self.folders[folder] = dict
+                d[stripflags (f)] = 'cur/%s' % f
+            self.folders[folder] = d
         return [
             '%s %s:%i:%s' % (
                 key,
@@ -180,7 +180,7 @@
             raise PermanentCommandError, 'mail folder %s does not contain message %s' % (maildir, msgfile)
         flags = extractflags (p)
         if not flag in flags:
-            if flag is 'N':
+            if flag == 'N':
                 # Special case; move file from cur to new
                 old = p
                 new = os.path.join ('new', os.path.split (p)[-1])
@@ -222,7 +222,7 @@
             raise PermanentCommandError, 'mail folder %s does not contain message %s' % (maildir, msgfile)
         flags = extractflags (p)
         if flag in flags:
-            if flag is 'N':
+            if flag == 'N':
                 # Special case; move file from new to cur
                 old = p
                 new = os.path.join ('cur', os.path.split (p)[-1])
@@ -322,26 +322,26 @@
         '''
         global deliverycount
         log (TRACE, 'old %s newmaildir %s\n' % (old, newmaildir))
-        oldmaildir, oldmsgfile = os.path.split (old)
+        oldmaildir, oldmsgid = os.path.split (old)
         # Make sure client isn't playing tricks
         assert_maildir (oldmaildir)
         assert_maildir (newmaildir)
         if newmaildir == oldmaildir:
             raise PermanentCommandError, 'destination mail folder same as source'
         try:
-            oldflags = extractflags (self.folders[oldmaildir][oldmsg])
-            p = os.path.join (oldmaildir, self.folders[oldmaildir][oldmsg])
+            oldflags = extractflags (self.folders[oldmaildir][oldmsgid])
+            p = os.path.join (oldmaildir, self.folders[oldmaildir][oldmsgid])
 
             # Set the mtime of the new message to the mtime of the old message
             oldinfo = os.stat (p)
             newpath = deliver_maildir (newmaildir, open (p, 'rb').read (), hostname, deliverycount)
             msgpath = os.path.join (newmaildir, newpath)
             newinfo = os.stat (msgpath)
-            sys.utime (msgpath, (newinfo.st_atime, oldinfo.st_mtime))
+            os.utime (msgpath, (newinfo.st_atime, oldinfo.st_mtime))
 
             deliverycount += 1
             os.remove (p)
-            del self.folders[oldmaildir][oldmsg]
+            del self.folders[oldmaildir][oldmsgid]
             newmsg = os.path.split (newpath)[1]
             newref = os.path.join (newmaildir, newmsg)
             self.folders[newmaildir][newmsg] = newpath
@@ -352,7 +352,7 @@
         except KeyError, err:
             raise PermanentCommandError, 'no such message in mail folder (%s)' % err
         except (OSError, os.error, IOError), err:
-            log (ERROR, 'failure moving message %s to %s: %s\n' % (old, new, err))
+            log (ERROR, 'failure moving message %s to %s: %s\n' % (old, newmaildir, err))
             raise TemporaryCommandError, 'failure moving message'
         return newmsg
 
@@ -384,7 +384,7 @@
             deliverycount += 1
             newmsg = os.path.split (newpath)[1]
             self.folders[path][newmsg] = newpath
-        except ValueError, err:
+        except ValueError:
             raise PermanentCommandError, 'message size invalid'
         except (OSError, os.error, IOError), err:
             log (ERROR, 'failure storing message to %s: %s\n' % (path, err))
@@ -522,7 +522,7 @@
     def mvfolder (self, oldpath, newpath):
         '''Move or rename a mail folder (maildir in this implementation).
         '''
-        log (TRACE, 'path %s\n' % path)
+        log (TRACE, 'oldpath %s newpath %s\n' % (oldpath, newpath))
         if not oldpath or oldpath[-1] == '/' or not newpath or newpath[-1] == '/':
             raise PermanentCommandError, 'invalid path'
         assert_maildir (oldpath)
@@ -622,7 +622,7 @@
                 else:
                     raise bSyntaxError, 'invalid command'
 
-            except bikiniExit, err:
+            except bikiniExit:
                 # No response to 'QUIT', just close the session
                 #self.respond ('success', 'goodbye')
                 sys.exit (0)
@@ -651,7 +651,7 @@
     me = '%s pid %i uid %i euid %i' % (os.path.split (sys.argv[0])[1], os.getpid(), os.getuid(), os.geteuid())
     try:
         os.chdir (mailstorepath)
-    except (OSError, os.error), err:
+    except (OSError, os.error), unused:
         log (FATAL, '%s: failed to chdir to mailstorepath %s\n' % (me, mailstorepath))
         sys.exit (1)
     log ('%s: starting in %s with inbox %s\n' % (me, mailstorepath, inboxpath))
@@ -670,7 +670,6 @@
 
     except UnhandledException, txt:
         log (FATAL, '\nbikini bug:  please include the following information in any bug report:\n\n')
-        log (FATAL, '  bikini version %s\n' % __version__)
         log (FATAL, '  Python version %s\n\n' % sys.version)
         log (FATAL, 'Unhandled exception follows:\n')
         exc_type, value, tb = sys.exc_info ()
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/serverauth.py bikini-20030306-0908/bikini/serverauth.py
--- bikini-20030305-1533/bikini/serverauth.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/serverauth.py	Thu Mar  6 09:08:42 2003
@@ -40,7 +40,6 @@
 import sys
 import os
 import signal
-import socket
 import traceback
 from types import *
 
@@ -165,7 +164,6 @@
 
     except UnhandledException, txt:
         log (FATAL, '\nbikini bug:  please include the following information in any bug report:\n\n')
-        log (FATAL, '  bikini version %s\n' % __version__)
         log (FATAL, '  Python version %s\n\n' % sys.version)
         log (FATAL, 'Unhandled exception follows:\n')
         exc_type, value, tb = sys.exc_info ()
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030305-1533/bikini/utilities.py bikini-20030306-0908/bikini/utilities.py
--- bikini-20030305-1533/bikini/utilities.py	Wed Mar  5 15:33:54 2003
+++ bikini-20030306-0908/bikini/utilities.py	Thu Mar  6 09:08:42 2003
@@ -123,7 +123,7 @@
 def validate_file (path):
     '''Validate a file name.
     '''
-    directory, file = os.path.split (path)
+    directory, f = os.path.split (path)
     validate_directory (directory)
     if os.path.islink (path):
         raise PermanentCommandError, 'is a symlink'