diff options
| author | Aditya Naik | 2013-12-27 22:44:21 +0530 |
|---|---|---|
| committer | Aditya Naik | 2013-12-27 22:44:21 +0530 |
| commit | 7be1f51f667da05805f225eb1e25410f82ce3bb3 (patch) | |
| tree | 98bcee4b63197d165d217f8d76defd3b18fe4a84 | |
| parent | 56e7929b04adc296462ff16973c573c44f4dd630 (diff) | |
minor changes. added version boilerplate (ver 2.3)
| -rw-r--r-- | aslclass.py | 10 |
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)) |
