From 1f3d79b89b8eeba541628835358c433b26cc8a96 Mon Sep 17 00:00:00 2001 From: "Camilo Carlos (Estagiario)" Date: Tue, 18 May 2010 20:07:46 +0000 Subject: [PATCH] =?UTF-8?q?Corrigindo=20scrpit=20de=20migra=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/migracao/migra.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/etc/migracao/migra.py b/etc/migracao/migra.py index b0284fc..15c4e43 100755 --- a/etc/migracao/migra.py +++ b/etc/migracao/migra.py @@ -136,17 +136,11 @@ def migra_casas(filename): linenum += 1 try: municipio = Municipio.objects.get(codigo_ibge=line[COD_IBGE_COL]) - #print line[COD_IBGE_COL] - #var = raw_input() - print municipio.codigo_ibge except Municipio.DoesNotExist: print "Municipio não existe" - #var = raw_input() - #print line[COD_IBDE_COL] print ERROR_MSG_1 % (filename, linenum) continue except ValueError: - var = raw_input() print ERROR_MSG_1 % (filename, linenum) continue casa = CasaLegislativa( @@ -159,12 +153,10 @@ def migra_casas(filename): pagina_web=line[PAGINA_COL], observacoes=line[OBS_COL], ) - #print casa.nome try: casa.save() except: print "Erro ao inserir casa" - #var = raw_input("teste") print ERROR_MSG_0 % (filename, linenum) continue @@ -382,13 +374,13 @@ def migra_convenios_assembleias(filename): if __name__ == '__main__': -# print "" -# migra_assembleias('assembleias.csv') -# print "" -# migra_casas('casas.csv') -# print "" -# migra_cnpj('cnpj.csv') + print "" + migra_assembleias('assembleias.csv') + print "" + migra_casas('casas.csv') + print "" + migra_cnpj('cnpj.csv') print "" migra_convenios_casas('casas.csv') -# print "" -# migra_convenios_assembleias('assembleias.csv') + print "" + migra_convenios_assembleias('assembleias.csv')