Use class attributes as much as possible for application output

refs #803
This commit is contained in:
Laurent Bachelier 2014-09-03 01:22:18 +02:00
commit c07e23cafc
35 changed files with 228 additions and 260 deletions

View file

@ -18,7 +18,6 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import sys
from weboob.capabilities.housing import CapHousing, Query
from weboob.tools.application.repl import ReplApplication, defaultcount
@ -167,12 +166,12 @@ class Flatboob(ReplApplication):
Get information about a housing.
"""
if not _id:
print >>sys.stderr, 'This command takes an argument: %s' % self.get_command_help('info', short=True)
print >>self.stderr, 'This command takes an argument: %s' % self.get_command_help('info', short=True)
return 2
housing = self.get_object(_id, 'get_housing')
if not housing:
print >>sys.stderr, 'Housing not found: %s' % _id
print >>self.stderr, 'Housing not found: %s' % _id
return 3
self.start_format()