Skip to content

Commit 2d9d644

Browse files
committed
Resolve conflicts
1 parent 3292d1e commit 2d9d644

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

Lib/pickletools.py

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,29 +2863,26 @@ def _main(args=None):
28632863
help='if more than one pickle file is specified, print this before'
28642864
' each disassembly')
28652865
args = parser.parse_args(args)
2866-
if not args.pickle_file:
2867-
parser.print_help()
2866+
annotate = 30 if args.annotate else 0
2867+
memo = {} if args.memo else None
2868+
if args.output is None:
2869+
output = sys.stdout
28682870
else:
2869-
annotate = 30 if args.annotate else 0
2870-
memo = {} if args.memo else None
2871-
if args.output is None:
2872-
output = sys.stdout
2873-
else:
2874-
output = open(args.output, 'w')
2875-
try:
2876-
for arg in args.pickle_file:
2877-
if len(args.pickle_file) > 1:
2878-
name = '<stdin>' if arg == '-' else arg
2879-
preamble = args.preamble.format(name=name)
2880-
output.write(preamble + '\n')
2881-
if arg == '-':
2882-
dis(sys.stdin.buffer, output, memo, args.indentlevel, annotate)
2883-
else:
2884-
with open(arg, 'rb') as f:
2885-
dis(f, output, memo, args.indentlevel, annotate)
2886-
finally:
2887-
if output is not sys.stdout:
2888-
output.close()
2871+
output = open(args.output, 'w')
2872+
try:
2873+
for arg in args.pickle_file:
2874+
if len(args.pickle_file) > 1:
2875+
name = '<stdin>' if arg == '-' else arg
2876+
preamble = args.preamble.format(name=name)
2877+
output.write(preamble + '\n')
2878+
if arg == '-':
2879+
dis(sys.stdin.buffer, output, memo, args.indentlevel, annotate)
2880+
else:
2881+
with open(arg, 'rb') as f:
2882+
dis(f, output, memo, args.indentlevel, annotate)
2883+
finally:
2884+
if output is not sys.stdout:
2885+
output.close()
28892886

28902887

28912888
if __name__ == "__main__":

0 commit comments

Comments
 (0)