Skip to content

Commit bb2149b

Browse files
committed
consistent output type
1 parent 553a325 commit bb2149b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

+stdlib/+python/is_mount.m

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@
44

55
function y = is_mount(filepath)
66

7-
y = logical.empty;
87

9-
10-
try %#ok<TRYNC>
8+
try
9+
y = false;
1110

1211
p = py.pathlib.Path(filepath);
13-
if ~p.exists(), return, end
12+
if ~p.exists()
13+
return
14+
end
1415

1516
% some Python on CI needs this. Didn't replicate on local Windows PC.
1617
if ispc() && strcmp(filepath, string(p.drive)) && ~endsWith(filepath, ["/", filesep])
17-
y = false;
1818
return
1919
end
2020

2121
y = py.os.path.ismount(p);
22+
catch e
23+
pythonException(e)
24+
y = logical.empty;
2225
end
2326

2427
end

+stdlib/+sys/get_owner.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
cmd = sprintf('stat -c %%U "%s"', file);
1414
end
1515

16-
if stdlib.exists(file)
16+
if ~stdlib.strempty(file)
1717
[s, m] = system(cmd);
1818
if s == 0
1919
o = strip(m);

+stdlib/get_owner.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
backend (1,:) string = ["java", "dotnet", "python", "sys"]
1414
end
1515

16-
r = string.empty;
16+
r = '';
1717

1818
for b = backend
1919
switch b

0 commit comments

Comments
 (0)