Add show-dupes command, fix BareExcept warnings.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const PIT_VERSION* = "4.23.3"
|
||||
const PIT_VERSION* = "4.23.4"
|
||||
|
||||
const USAGE* = """Usage:
|
||||
pit ( new | add) <summary> [<state>] [options]
|
||||
@ -14,6 +14,7 @@ const USAGE* = """Usage:
|
||||
pit ( delete | rm ) <id>... [options]
|
||||
pit add-binary-property <id> <propName> <propSource> [options]
|
||||
pit get-binary-property <id> <propName> <propDest> [options]
|
||||
pit show-dupes
|
||||
pit help [options]
|
||||
|
||||
Options:
|
||||
|
@ -168,7 +168,7 @@ proc parseDate*(d: string): DateTime =
|
||||
var errMsg = ""
|
||||
for df in DATE_FORMATS:
|
||||
try: return d.parse(df)
|
||||
except:
|
||||
except CatchableError:
|
||||
errMsg &= "\n\tTried " & df & " with " & d
|
||||
continue
|
||||
raise newException(ValueError, "Unable to parse input as a date: " & d & errMsg)
|
||||
@ -426,7 +426,7 @@ proc loadConfig*(args: Table[string, Value] = initTable[string, Value]()): PitCo
|
||||
try:
|
||||
cfgFile = open(pitrcFilename, fmWrite)
|
||||
cfgFile.write("{\"tasksDir\": \"/path/to/tasks\"}")
|
||||
except: warn "could not write default .pitrc to " & pitrcFilename
|
||||
except CatchableError: warn "could not write default .pitrc to " & pitrcFilename
|
||||
finally: close(cfgFile)
|
||||
|
||||
debug "loading config from '$#'" % [pitrcFilename]
|
||||
|
Reference in New Issue
Block a user