[Checkins] SVN: z3c.filetype/trunk/src/z3c/filetype/magic.py removed pwd dep. to work on win

Bernd Dorn bernd.dorn at fhv.at
Wed Aug 16 12:54:52 EDT 2006


Log message for revision 69567:
  removed pwd dep. to work on win

Changed:
  U   z3c.filetype/trunk/src/z3c/filetype/magic.py

-=-
Modified: z3c.filetype/trunk/src/z3c/filetype/magic.py
===================================================================
--- z3c.filetype/trunk/src/z3c/filetype/magic.py	2006-08-16 16:08:11 UTC (rev 69566)
+++ z3c.filetype/trunk/src/z3c/filetype/magic.py	2006-08-16 16:54:51 UTC (rev 69567)
@@ -1,7 +1,7 @@
 # Found on a russian zope mailing list, and modified to fix bugs in parsing
 # the magic file and string making
 # -- Daniel Berlin <dberlin at dberlin.org>
-import sys, struct, time, re, exceptions, pprint, stat, os, pwd, grp
+import sys, struct, time, re, exceptions, pprint, stat, os,  grp
 
 _mew = 0
 
@@ -508,6 +508,7 @@
 
 def username(uid):
     try:
+        import pwd
         return pwd.getpwuid( uid )[0]
     except:
         return '#%s'%uid



More information about the Checkins mailing list