Create the metadata directory if it doesn't exist yet.
authorFabian Groffen <grobian@gentoo.org>
Tue, 26 Dec 2006 08:44:32 +0000 (08:44 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 26 Dec 2006 08:44:32 +0000 (08:44 -0000)
Fix gmtime() being an argument of strftime, not write.

svn path=/main/branches/prefix/; revision=5395

bin/emerge

index 12930bc9f16f1593a4965960436ca954fd34fff8..83ce188040ec19e5eca6c73a5f8aef03da1729b9 100755 (executable)
@@ -3815,8 +3815,10 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
 
                # write timestamp.chk
                try:
+                       if not os.path.exists(os.path.join(myportdir, "metadata")):
+                               os.mkdir(os.path.join(myportdir, "metadata"))
                        f = open(os.path.join(myportdir, "metadata", "timestamp.chk"), 'w')
-                       f.write(time.strftime("%a, %d %b %Y %H:%M:%S +0000"), time.gmtime())
+                       f.write(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()))
                        f.write('\n')
                        f.close()
                except IOError e: