Skip to content

Commit 6d52d17

Browse files
committed
Added reboot and file append is better
1 parent 98183be commit 6d52d17

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

adafruit_shell.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ def clear():
135135
"""
136136
os.system("clear")
137137

138+
@staticmethod
139+
def reboot():
140+
"""
141+
Reboot the system
142+
"""
143+
os.system("reboot")
144+
138145
@staticmethod
139146
def is_root():
140147
"""
@@ -158,6 +165,7 @@ def write_text_file(path, content, append=True):
158165
"""
159166
if append:
160167
mode = "a"
168+
content = "\n" + content
161169
else:
162170
mode = "w"
163171
service_file = open(path, mode)

0 commit comments

Comments
 (0)