diff options
Diffstat (limited to 'jimbrella')
-rw-r--r-- | jimbrella/jform.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jimbrella/jform.py b/jimbrella/jform.py index de2c508..e9f2a50 100644 --- a/jimbrella/jform.py +++ b/jimbrella/jform.py @@ -51,7 +51,10 @@ class JForm: with open(self._bookmark_fp) as f: bookmark = f.read() f.close() - return int(bookmark) + try: + return int(bookmark) + except ValueError: + return 0 except FileNotFoundError: # create file with open(self._bookmark_fp, "x") as f: |