# HG changeset patch
# User jfp <jf.pieronne@laposte.net>
# Date 1733933721 -3600
#      Wed Dec 11 17:15:21 2024 +0100
# Node ID c44aa6c462d21d3095133ef05c6c6697367670d6
# Parent  3b1292db05721c46e62b0c8bf10cfef72c68dd93
Update rule1301, ignore disuser account

diff --git a/secrules/rules13.py b/secrules/rules13.py
--- a/secrules/rules13.py
+++ b/secrules/rules13.py
@@ -5,7 +5,7 @@
 from ovms import starlet
 from ovms.rtl import lib
 from ovms import user
-from ovms import rmsdef, ossdef, ssdef
+from ovms import rmsdef, ossdef, ssdef, uaidef
 from ovms import itemList
 from ovms.rtl.lib.FindFile import FindFile, file_exists
 
@@ -17,9 +17,9 @@
         with FindFile(fn, b'') as ifn:
             ifn.__next__()
             return 1
-    except StopIteration as e:
+    except StopIteration as _e:
         return 3
-    except VMSError as e:
+    except VMSError as _e:
         return 2
 
 
@@ -41,6 +41,9 @@
             if not fmt:
                 print('skip default account', file=fo)
             continue
+        # ignore disuser account
+        if u.flags & uaidef.UAI_M_DISACNT:
+            continue
         fn: bytes = u.defdev + u.defdir + b'*.*'
         if path_exists(fn) == 2:
             if fmt:
@@ -173,7 +176,7 @@
                     f: bytes
                     lgicmd = f
                     break
-        except VMSError as e:
+        except VMSError as _e:
             continue
         if lgicmd == b'' or not file_exists(lgicmd):
             if fmt: