Skip to content

Commit bba9947

Browse files
committed
Replace try-except blocks with contextlib.suppress() for cleaner error handling.
1 parent b4d9a5d commit bba9947

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

pyxcp/examples/xcphello.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,7 @@
1010
daq_info = False
1111

1212

13-
def callout(master, args):
14-
global daq_info
15-
if args.daq_info:
16-
daq_info = True
17-
18-
19-
ap = ArgumentParser(description="pyXCP hello world.", callout=callout)
20-
ap.parser.add_argument(
21-
"-d",
22-
"--daq-info",
23-
dest="daq_info",
24-
help="Display DAQ-info",
25-
default=False,
26-
action="store_true",
27-
)
13+
ap = ArgumentParser(description="pyXCP hello world.")
2814

2915
with ap.run() as x:
3016
x.connect()

0 commit comments

Comments
 (0)