MCPcopy
hub / github.com/RUB-NDS/PRET / do_lock

Method do_lock

pjl.py:800–813  ·  view source on GitHub ↗

Lock control panel settings and disk write access.

(self, arg)

Source from the content-addressed store, hash-verified

798
799 # ------------------------[ lock <pin> ]------------------------------
800 def do_lock(self, arg):
801 "Lock control panel settings and disk write access."
802 if not arg:
803 arg = eval(input("Enter PIN (1..65535): "))
804 self.cmd(
805 "@PJL DEFAULT PASSWORD="
806 + arg
807 + c.EOL
808 + "@PJL DEFAULT CPLOCK=ON"
809 + c.EOL
810 + "@PJL DEFAULT DISKLOCK=ON",
811 False,
812 )
813 self.show_lock()
814
815 def show_lock(self):
816 passwd = self.cmd("@PJL DINQUIRE PASSWORD") or "UNSUPPORTED"

Callers

nothing calls this directly

Calls 2

cmdMethod · 0.95
show_lockMethod · 0.95

Tested by

no test coverage detected