Skip to content

Commit ea9c7ee

Browse files
authored
Update mine-timer.py
1 parent 72b46d1 commit ea9c7ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mine-timer.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def calculate_checksum(data):
2323
return hashlib.sha256(data.encode()).hexdigest()
2424

2525
def get_playtime_file_path():
26-
"""Get the path to the playtime file in the AppData directory."""
2726
appdata_dir = os.getenv('APPDATA')
2827
playtime_dir = os.path.join(appdata_dir, 'MineTimer')
2928
if not os.path.exists(playtime_dir):
@@ -37,7 +36,6 @@ def write_playtime(file_path, playtime):
3736
file.write(f"{data}\n{checksum}")
3837

3938
def read_playtime(file_path):
40-
"""Read the playtime from the file and verify the checksum."""
4139
if not os.path.exists(file_path):
4240
write_playtime(file_path, 0)
4341
return 0
@@ -157,7 +155,8 @@ def hide_window():
157155
def open_website():
158156
webbrowser.open("https://www.goofert.org/")
159157

160-
def open_github():webbrowser.open("https://github.com/Goofert42/MineTimer")
158+
def open_github():
159+
webbrowser.open("https://github.com/Goofert42/MineTimer")
161160

162161
def add_to_startup():
163162
try:
@@ -238,4 +237,4 @@ def create_gui(startup=False):
238237
startup = "--startup" in sys.argv
239238
tray_thread = threading.Thread(target=run_tray_icon, daemon=True)
240239
tray_thread.start()
241-
create_gui(startup)
240+
create_gui(startup)

0 commit comments

Comments
 (0)