From: Sofia Papagiannaki Date: Thu, 22 Sep 2011 11:37:40 +0000 (+0300) Subject: Refs #1171 X-Git-Tag: pithos/v0.7.8~42^2~4 X-Git-Url: https://code.grnet.gr/git/pithos/commitdiff_plain/9ba300d412d4807fc8972150fc7f0fe236a0108d Refs #1171 --- diff --git a/tools/migration b/tools/migration index 44bc0b6..7570b75 100755 --- a/tools/migration +++ b/tools/migration @@ -100,23 +100,12 @@ class DataMigration(Migration): s = select([filebody.c.id, filebody.c.storedfilepath]) rp = self.conn.execute(s) - #basepath = '/Users/butters/Downloads' - #files = os.listdir(basepath) - #files = [f for f in files if not os.path.isdir(os.path.join(basepath, f))] - #i = 0 - while True: t = rp.fetchone() if not t: break - name, path = t - - #id, path = t[0], os.path.join(basepath, files[i]) - #i+=1 - #if i == len(files): - # break - - print id, path + id, path = t + print '#', id, path hashlist = self.blocker.block_stor_file(open(path))[1] self.mapper.map_stor(id, hashlist) rp.close() @@ -180,7 +169,6 @@ class ObjectMigration(DataMigration): if __name__ == "__main__": db = '' - #db = 'postgresql://gss:archipelagos@62.217.112.56/pithos' t = UserMigration(db) t.execute()