Revision 9ba300d4 tools/migration

b/tools/migration
100 100
        s = select([filebody.c.id, filebody.c.storedfilepath])
101 101
        rp = self.conn.execute(s)
102 102
        
103
        #basepath = '/Users/butters/Downloads'
104
        #files = os.listdir(basepath)
105
        #files = [f for f in files if not os.path.isdir(os.path.join(basepath, f))]
106
        #i = 0
107
        
108 103
        while True:
109 104
            t = rp.fetchone()
110 105
            if not t:
111 106
                break
112
            name, path = t
113
            
114
            #id, path = t[0], os.path.join(basepath, files[i])
115
            #i+=1
116
            #if i == len(files):
117
            #    break
118
            
119
            print id, path
107
            id, path = t
108
            print '#', id, path
120 109
            hashlist = self.blocker.block_stor_file(open(path))[1]
121 110
            self.mapper.map_stor(id, hashlist)
122 111
        rp.close()
......
180 169
    
181 170
if __name__ == "__main__":
182 171
    db = ''
183
    #db = 'postgresql://gss:archipelagos@62.217.112.56/pithos'
184 172
    t = UserMigration(db)
185 173
    t.execute()
186 174
    

Also available in: Unified diff