Skip to content

Commit 5dc1d75

Browse files
authored
Merge pull request #37 from trapexit/maxint
change default max values to 2**64 from sys.maxint
2 parents 9dd3846 + 985976e commit 5dc1d75

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scorch

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ ERROR_NOT_FOUND = 16
5252
ERROR_INTERRUPTED = 32
5353

5454

55+
MAX_ACTIONS = 2**64
56+
MAX_TIME = 2**64
57+
MAX_DATA = 2**64
58+
5559
class Options(object):
5660
verbose = 0
5761
hash = 'md5'
5862
quote = 0
5963
sort = None
6064
filter = None
61-
maxactions = sys.maxsize
62-
maxdata = sys.maxsize
63-
maxtime = sys.maxsize
65+
maxactions = MAX_ACTIONS
66+
maxdata = MAX_DATA
67+
maxtime = MAX_TIME
6468
breakonerror = False
6569
diff_fields = ['size']
6670

@@ -253,10 +257,10 @@ optional arguments:
253257
* mtime-desc: sort by file mtime, descending
254258
* checked: sort by last time checked, ascending
255259
* checked-desc: sort by last time checked, descending
256-
-m, --maxactions=: Max actions before exiting. (default: maxint)
257-
-M, --maxdata=: Max bytes to process before exiting. (default: maxint)
260+
-m, --maxactions=: Max actions before exiting. (default: 2**64)
261+
-M, --maxdata=: Max bytes to process before exiting. (default: 2**64)
258262
Can use 'K', 'M', 'G', 'T' suffix.
259-
-T, --maxtime=: Max time to process before exiting. (default: maxint)
263+
-T, --maxtime=: Max time to process before exiting. (default: 2**64)
260264
Can use 's', 'm', 'h', 'd' suffix.
261265
-b, --break-on-error: Any error or digest mismatch will cause an exit.
262266
-D, --diff-fields=: Fields to use to indicate a file has 'changed' (vs.

0 commit comments

Comments
 (0)