Skip to content

Commit 5374a76

Browse files
committed
small fixes
- handle cancelled askdirectory dialog - update README.md
1 parent ced8b2c commit 5374a76

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
anonymize-slide
2-
===============
1+
anonymize-slide-python3-gui
2+
===========================
33

44
This adds a very simple GUI interface to [Benjamin Gilbert's anonymize-slide](https://github.com/bgilbert/anonymize-slide) program which I previously [updated to run under python3](https://github.com/cornish/anonymize-slide-python3). The CLI functions still work as previously (see below). If no CLI arguments are supplied, the GUI is launched.
55

anonymize-slide-gui.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,14 @@ def gui():
547547

548548
if not response:
549549
print("Cancelled")
550-
sys.exit()
550+
sys.exit(1)
551551

552552
dir = fd.askdirectory(initialdir=application_path,title='Select directory')
553553

554+
if dir == '':
555+
print("Cancelled")
556+
sys.exit(1)
557+
554558
wsi_exts = ['.svs','.ndpi','.mrxs','.py']
555559
filepaths = []
556560
for file in os.listdir(dir):

0 commit comments

Comments
 (0)