X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Fprofile.py;h=cc0a4a1dc69e618a2648662ce7165f9f557bca77;hb=HEAD;hp=ecfb3542cff889150b4202f7375d25834cfabc02;hpb=40277671182cc3dd6ea80346630cc22d03235033;p=automanga.git diff --git a/manga/profile.py b/manga/profile.py index ecfb354..2b7a15a 100644 --- a/manga/profile.py +++ b/manga/profile.py @@ -219,6 +219,12 @@ class filemanga(manga): else: f.write(consline("lset", key, *val) + "\n") + def mtime(self): + try: + return os.stat(self.path).st_mtime + except FileNotFoundError: + return 0 + class profile(object): def __init__(self, dir): self.dir = dir @@ -256,7 +262,7 @@ class profile(object): raise KeyError("no such manga: (%s, %s)" % (libnm, id)) while True: try: - fp = openwdir(pj(self.dir, "%i.manga" % seq), "wx") + fp = openwdir(pj(self.dir, "%i.manga" % seq), "x") except IOError: seq += 1 else: