Open .mw/version file for writing
[mw] / src / mw / metadir.py
index 27e2fec06bf2253c3b836c9d8768a5a162584411..49a91cf588f943c719a71845f9fc97e9b81523aa 100644 (file)
@@ -52,7 +52,7 @@ class Metadir(object):
         else:
             os.mkdir(self.location, 0755)
         # metadir versioning
         else:
             os.mkdir(self.location, 0755)
         # metadir versioning
-        fd = file(os.path.join(self.location, 'version'))
+        fd = file(os.path.join(self.location, 'version'), 'w')
         fd.write('1')
         fd.close()
         # create config
         fd.write('1')
         fd.close()
         # create config

Benjamin Mako Hill || Want to submit a patch?