From fd88d0606759107336d1a6c6a060771763fdc2bb Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Fri, 13 May 2005 02:57:19 +0000 Subject: main(): Honor doprint even if we're not in filetype == 1. --- bin/dumpdb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/dumpdb b/bin/dumpdb index 42166263..09370fd0 100644 --- a/bin/dumpdb +++ b/bin/dumpdb @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2004 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2005 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -132,18 +132,21 @@ def main(): m = [] try: cnt = 1 - print _('[----- start pickle file -----]') + if doprint: + print _('[----- start pickle file -----]') while True: try: obj = load(fp) except EOFError: - print _('[----- end pickle file -----]') + if doprint: + print _('[----- end pickle file -----]') break - print _('<----- start object %(cnt)s ----->') - if isinstance(obj, StringType): - print obj - else: - pp.pprint(obj) + if doprint: + print _('<----- start object %(cnt)s ----->') + if isinstance(obj, StringType): + print obj + else: + pp.pprint(obj) cnt += 1 m.append(obj) finally: -- cgit v1.2.3