projects
/
rawdog
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd6836d
)
Print a more useful error message if the statefile can't be read.
author
Adam Sampson
<ats@offog.org>
Sun, 12 Oct 2003 00:12:05 +0000
(
00:12
+0000)
committer
Adam Sampson
<ats@offog.org>
Sun, 12 Oct 2003 00:12:05 +0000
(
00:12
+0000)
rawdoglib/rawdog.py
patch
|
blob
|
history
diff --git
a/rawdoglib/rawdog.py
b/rawdoglib/rawdog.py
index dfa03498f835866f9cee1846e407f3c09b27404d..aeaf384f59f108f068fee368e89b57edd1f7a7fc 100644
(file)
--- a/
rawdoglib/rawdog.py
+++ b/
rawdoglib/rawdog.py
@@
-591,7
+591,12
@@
def main(argv):
return 1
persister = Persister("state", Rawdog)
- rawdog = persister.load()
+ try:
+ rawdog = persister.load()
+ except:
+ print "An error occurred while reading state from ~/.rawdog/state."
+ print "This usually means the file is corrupt, and removing it will fix the problem."
+ return 1
for o, a in optlist:
if o in ("-u", "--update"):