summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aslclass.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/aslclass.py b/aslclass.py
index 3307d7c..174f15d 100644
--- a/aslclass.py
+++ b/aslclass.py
@@ -3,6 +3,8 @@
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
+# ---Version 2.3---
+
import sys
import os
@@ -36,8 +38,7 @@ class ASLreport:
print(pathlist)
serial=input("Enter the serial number of the savefile (starts from 0)\n")
if listpaths('.')[int(serial)][-9:len(listpaths('.')[int(serial)])]!="savestate":
- print("unknown filetype")
- sys.exit(1)
+ sys.exit("unknown filetype")
loader=open(listpaths('.')[int(serial)], mode="r").read()
data=re.search(r"(?P<MovieName>.+)\n(?P<TotalTime>.+)\n(?P<ShotCount>\d+)",loader)
try:
@@ -45,8 +46,7 @@ class ASLreport:
self.totaltime=float(data.group('TotalTime'))
self.shotcount=int(data.group('ShotCount'))
except AttributeError:
- print("unknown filetype")
- sys.exit(0)
+ sys.exit("unknown filetype")
print("press enter to start loaded state")
if str(msvcrt.getch())[-2]=="r":
print("loaded state")
@@ -108,7 +108,7 @@ class ASLreport:
def savestate(self):
saver=open("%s.savestate"%self.name, mode="w")
- saver.write("%s %f %f"%(self.name,self.totaltime,self.shotcount))
+ saver.write("%s\n%f\n%f"%(self.name,self.totaltime,self.shotcount))