From d5711ec17637a1c815e8a62c45bf5582830ddf54 Mon Sep 17 00:00:00 2001 From: Eduardo Elias Camponez Date: Sat, 4 May 2013 18:27:57 -0300 Subject: [PATCH] Refac: get_contribuinte -> get_campo_contribuinte --- src/contribuinte.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contribuinte.py b/src/contribuinte.py index 491830c..ad10a21 100644 --- a/src/contribuinte.py +++ b/src/contribuinte.py @@ -97,7 +97,7 @@ class Contribuinte: def set_nome(self, nome): self.set_declaracao("nome", nome) - def get_contribuinte(self, attr): + def get_campo_contribuinte(self, attr): if attr == "nome": return self.get_nome() return self._get_attr(self.contribuinte, attr) @@ -157,14 +157,14 @@ if __name__ == '__main__': print "Carregando CPF " + contribuinte._normalize_cpf(sys.argv[1]) if len(sys.argv) == 4: - print "Valor anterior: " + contribuinte.get_contribuinte(sys.argv[2]) + print "Valor anterior: " + contribuinte.get_campo_contribuinte(sys.argv[2]) contribuinte.set_contribuinte(sys.argv[2], sys.argv[3]) - print "Valor atual: " + contribuinte.get_contribuinte(sys.argv[2]) + print "Valor atual: " + contribuinte.get_campo_contribuinte(sys.argv[2]) print "Salvando..." contribuinte.save() elif len(sys.argv) == 3: campo = sys.argv[2] - valor = contribuinte.get_contribuinte(campo) + valor = contribuinte.get_campo_contribuinte(campo) if valor: print ("Valor de " + campo + ": " + valor) else: @@ -172,7 +172,7 @@ if __name__ == '__main__': else: print "\nCONTRIBUINTE:" for i in contribuinte_attributes: - val = contribuinte.get_contribuinte(i) + val = contribuinte.get_campo_contribuinte(i) if val == None: val = "" print i + ": " + val -- 2.20.1