Author: tack
Date: Sat Dec 30 00:29:03 2006
New Revision: 2311

Modified:
   trunk/base/src/distribution/core.py

Log:
More pythonic


Modified: trunk/base/src/distribution/core.py
==============================================================================
--- trunk/base/src/distribution/core.py (original)
+++ trunk/base/src/distribution/core.py Sat Dec 30 00:29:03 2006
@@ -392,16 +392,11 @@
         if not os.path.isfile('%s.ebuild' % name):
             print 'No ebuild template provided'
             return 0
-        fd = open('%s.ebuild' % name)
-        edata = fd.readlines()
-        fd.close()
+        edata = open('%s.ebuild' % name).read()
         ebuild = '%s/dev-python/%s/%s-%s.ebuild' % (self.prefix, name, name, 
version)
         if not os.path.isdir(os.path.dirname(ebuild)):
             os.makedirs(os.path.dirname(ebuild))
-        fd = open(ebuild, 'w')
-        for line in edata:
-            fd.write(line)
-        fd.close()
+        open(ebuild, 'w').write(edata)
         os.system('ebuild %s digest' % ebuild)
 
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to