From 0fd18db80622fea8d626b7cb37ca88d598727491 Mon Sep 17 00:00:00 2001 From: Guilherme Gondim Date: Thu, 17 Dec 2009 21:02:09 +0000 Subject: [PATCH] Resolvido alguns bugs. --- etc/migracao/migra.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/migracao/migra.py b/etc/migracao/migra.py index 502aef2..8ffed80 100755 --- a/etc/migracao/migra.py +++ b/etc/migracao/migra.py @@ -210,6 +210,9 @@ def migra_cnpj(filename): except CasaLegislativa.DoesNotExist: print ERROR_MSG_1 % (filename, linenum) continue + except CasaLegislativa.MultipleObjectsReturned: + print ERROR_MSG_1 % (filename, linenum) + continue except ValueError: print ERROR_MSG_1 % (filename, linenum) continue @@ -274,6 +277,6 @@ if __name__ == '__main__': print "" migra_casas('casas.csv') print "" - migra_cnpj('cnpj.csv', 'casas.csv') + migra_cnpj('cnpj.csv') print "" migra_convenios('casas.csv')