From ecb4b4c8c56d9f720ba004fcfefd40acb996cc7e Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Wed, 16 Mar 2022 23:13:48 +0200 Subject: Fixing comments and documentation --- AllAboutData/utils/osSpecific.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'AllAboutData/utils/osSpecific.py') diff --git a/AllAboutData/utils/osSpecific.py b/AllAboutData/utils/osSpecific.py index 7caf664..c89e65a 100644 --- a/AllAboutData/utils/osSpecific.py +++ b/AllAboutData/utils/osSpecific.py @@ -2,14 +2,17 @@ import os import sys # terminal commands, which are unfortunately os-specific - def whichOs(): +''' Returns "windows" if used os is windows. If not, returns "good" ''' + if sys.platform == "win32": return "windows" else: - return "good" # ...right? + return "good" def deleteDataDir(): +''' Removes Data directory from working directroy ''' + if whichOs() == "windows": os.system("rmdir \s Data") else: @@ -17,6 +20,8 @@ def deleteDataDir(): def addDataDir(): +''' Adds data directory from working directroy ''' + if whichOs() == "windows": os.system("mkdir Data\Players") else: -- cgit v1.2.3