Yeah, that's not a bad idea.

It looks like you lost your notes_to_myself file, which keeps track  
of what format the spool directory is in.

I'll add that check to current SVN. It'll allow the migration code to  
run cleanly on a spool dir that's already been updated.

---

James



On 03/06/2006, at 12:23 AM, S?rgio Freire wrote:

> Hi again,
> I "fixed" this by adding a check to see if the file is a directory  
> or not in housekeep.py" line 70. Is this correct? See lines bellow:
>
>
>
>         for file in os.listdir(pre):
>                 try:
>                         print "#0FILE:",file
>                         if (os.path.isdir(pre+file)):
>                                 continue
>                         else:
>                                 file = xdb.unmangle(file).decode 
> ("utf-8")
>                                 filej = xmlw.jid.intern(file).full()
>                                 if(file != filej):
>                                         print "#aFILE:",file
>                                         print "#aFILEj:",filej
>                                         file = xdb.mangle(file)
>                                         filej = xdb.mangle(filej)
>                                         print "#FILE:",file
>                                         print "#FILEj:",filej
>                                         if(os.path.exists(filej)):
>                                                 print "Need to  
> move", file, "to", filej, "but the latter exists!\nAborting!"
>                                                 os.exit(1)
>                                         else:
>                                                 shutil.move(pre +  
> file, pre + filej)
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:py-transports- 
> [EMAIL PROTECTED] On Behalf Of S?rgio Freire
> Sent: Friday, June 02, 2006 2:07 PM
> To: PyTransports Discussion
> Subject: RE: [py-transports] pymsnt problem with spool dir
>
> Doing a "ls" in the spool dir I have lots of xml files of the   
> users and several directories. One of the directory is called "aq"  
> but there's no file name "aq" or "@aq"
>
>
> I changed the code of housekeep.py in order to print he variables  
> like you can see bellow:
> -----
>        for file in os.listdir(pre):
>                 try:
>                         file = xdb.unmangle(file).decode("utf-8")
>                         filej = xmlw.jid.intern(file).full()
>                         if(file != filej):
>                                 print "#aFILE:",file
>                                 print "#aFILEj:",filej
>                                 file = xdb.mangle(file)
>                                 filej = xdb.mangle(filej)
>                                 print "#FILE:",file
>                                 print "#FILEj:",filej
>                                 if(os.path.exists(filej)):
>                                         print "Need to move", file,  
> "to", filej, "but the latter exists!\nAborting!"
>                                         os.exit(1)
>                                 else:
>                                         shutil.move(pre + file, pre  
> + filej)
>                 except:
>                         print "File: " + file
>                         raise
>
> ----------
>
>
> The results are these:
>
> #aFILE: @aq
> #aFILEj: aq
> #FILE: %aq
> #FILEj: aq
> File: %aq
> An error occurred during one of the automatic data update routines.  
> Please report this bug.
>
>
>
> Any ideas?
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:py-transports- 
> [EMAIL PROTECTED] On Behalf Of S?rgio Freire
> Sent: Friday, June 02, 2006 1:53 PM
> To: PyTransports Discussion
> Subject: [py-transports] pymsnt problem with spool dir
> Importance: High
>
> Hi.
> Im using latest revision from SVN and Im having this problem... it  
> appeared after a restart to the transport/machine.
>
>
> Checking spool files and stringprepping any if necessary... File:  
> %                                             aq
> An error occurred during one of the automatic data update routines.  
> Please repor                                             t this bug.
> Traceback (most recent call last):
>   File "/home/jabber/jabber/pymsnt/PyMSNt.py", line 12, in ?
>     main.main()
>   File "/home/jabber/jabber/pymsnt/src/main.py", line 391, in main
>     app = App()
>   File "/home/jabber/jabber/pymsnt/src/main.py", line 331, in __init__
>     housekeep.init()
>   File "/home/jabber/jabber/pymsnt/src/housekeep.py", line 25, in init
>     noteListF[noteList.index(note)]()
>   File "/home/jabber/jabber/pymsnt/src/housekeep.py", line 80, in  
> doSpoolPrepChe                                             ck
>     shutil.move(pre + file, pre + filej)
>   File "/usr/lib/python2.3/shutil.py", line 170, in move
>     copy2(src,dst)
>   File "/usr/lib/python2.3/shutil.py", line 82, in copy2
>     copyfile(src, dst)
>   File "/usr/lib/python2.3/shutil.py", line 37, in copyfile
>     fsrc = open(src, 'rb')
> IOError: [Errno 2] No such file or directory: '/home/jabber/ 
> jabber-1.4.2/pymsnt-                                              
> 0.11/data/msn.localhost/%aq'
>
>
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports

Reply via email to